Added small docs
This commit is contained in:
parent
97443604b7
commit
d1d44b84a9
32
README.md
32
README.md
@ -1,7 +1,33 @@
|
|||||||
## Robot Package Template
|
## Robot Package Template
|
||||||
|
|
||||||
This is a GitHub template. You can make your own copy by clicking the green "Use this template" button.
|
### Installation
|
||||||
|
```
|
||||||
|
sudo apt-get install ros-iron-ros-gz ros-iron-robot-state-publisher
|
||||||
|
```
|
||||||
|
|
||||||
It is recommended that you keep the repo/package name the same, but if you do change it, ensure you do a "Find all" using your IDE (or the built-in GitHub IDE by hitting the `.` key) and rename all instances of `my_bot` to whatever your project's name is.
|
### Execution
|
||||||
|
```
|
||||||
|
ros2 launch sensor_sim launch_sim.py
|
||||||
|
```
|
||||||
|
|
||||||
Note that each directory currently has at least one file in it to ensure that git tracks the files (and, consequently, that a fresh clone has direcctories present for CMake to find). These example files can be removed if required (and the directories can be removed if `CMakeLists.txt` is adjusted accordingly).
|
### Changing the position of lidar and camera
|
||||||
|
|
||||||
|
In `/description/lidar.xacro` there is a block looking like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
<joint name="laser_joint" type="fixed">
|
||||||
|
<parent link="chassis"/>
|
||||||
|
<child link="laser_frame"/>
|
||||||
|
<origin xyz="-1.1 0.0 1.0" rpy="0 0 0"/>
|
||||||
|
</joint>
|
||||||
|
```
|
||||||
|
Modifying the origin key changes the position of the lidar (relative to the center of the front axle of the car). The simulation needs to be restarted.
|
||||||
|
There is a similar block in `/description/bbox_camera.xacro` looking like
|
||||||
|
```
|
||||||
|
<joint name="camera_joint" type="fixed">
|
||||||
|
<parent link="laser_frame"/>
|
||||||
|
<child link="camera_link"/>
|
||||||
|
<origin xyz="0 -0.2 0" rpy="0 0 0"/>
|
||||||
|
</joint>
|
||||||
|
```
|
||||||
|
Modifying the origin yields the same result, but the camera is relative to the position of the lidar.
|
@ -35,12 +35,6 @@ def generate_launch_description():
|
|||||||
parameters=[params]
|
parameters=[params]
|
||||||
)
|
)
|
||||||
|
|
||||||
node_joint_state_publisher = Node(
|
|
||||||
package='joint_state_publisher',
|
|
||||||
executable='joint_state_publisher',
|
|
||||||
parameters=[{'use_sim_time': True}]
|
|
||||||
)
|
|
||||||
|
|
||||||
gazebo = IncludeLaunchDescription(
|
gazebo = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource([os.path.join(
|
PythonLaunchDescriptionSource([os.path.join(
|
||||||
get_package_share_directory('ros_gz_sim'), 'launch', 'gz_sim.launch.py')]),
|
get_package_share_directory('ros_gz_sim'), 'launch', 'gz_sim.launch.py')]),
|
||||||
@ -95,7 +89,6 @@ def generate_launch_description():
|
|||||||
default_value='-45',
|
default_value='-45',
|
||||||
description='Lower limit of FOV of lidar'),
|
description='Lower limit of FOV of lidar'),
|
||||||
node_robot_state_publisher,
|
node_robot_state_publisher,
|
||||||
node_joint_state_publisher,
|
|
||||||
gazebo,
|
gazebo,
|
||||||
spawn_entity,
|
spawn_entity,
|
||||||
bridge,
|
bridge,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user