sensor_sim/README.md

33 lines
949 B
Markdown
Raw Normal View History

2023-11-29 23:07:49 +01:00
## Robot Package Template
2023-11-29 23:16:24 +01:00
### Installation
```
sudo apt-get install ros-iron-ros-gz ros-iron-robot-state-publisher
```
2023-11-29 23:07:49 +01:00
2023-11-29 23:16:24 +01:00
### Execution
```
ros2 launch sensor_sim launch_sim.py
```
2023-11-29 23:07:49 +01:00
2023-11-29 23:16:24 +01:00
### 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.