Skip to content

Commit

Permalink
add 3d color camera + parcours
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonR99 committed Jun 17, 2024
1 parent ba7ed0e commit fe3f7a9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 10 deletions.
35 changes: 33 additions & 2 deletions src/rove_description/urdf/sensor.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@
<child link="sensor_link" />
<origin xyz="0.1 0 0.4" rpy="0 0 0" />
</joint>

<joint name="camera_joint" type="fixed">
<parent link="sensor_link" />
<child link="camera_link" />
<origin xyz="0.1 0 0.4" rpy="-1.57 0 -1.57" />
</joint>

<link name="camera_link">
<inertial>
<origin xyz="0 0 0" rpy="0 0 0" />
<mass value="0.1" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder length="0.1" radius="0.1" />
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder length="0.1" radius="0.1" />
</geometry>
</collision>
</link>



<link name="sensor_link">
<inertial>
<origin xyz="0 0 0" rpy="0 0 0" />
Expand Down Expand Up @@ -45,7 +74,7 @@
<topic>navsat</topic>
</sensor>
<sensor name="depth_camera1" type="depth_camera">
<gz_frame_id>sensor_link</gz_frame_id>
<gz_frame_id>camera_link</gz_frame_id>
<update_rate>10</update_rate>
<topic>depth_camera</topic>
<camera>
Expand All @@ -59,10 +88,12 @@
<near>0.5</near>
<far>20.0</far>
</clip>
<!-- Rotate the camera to point forward -->
<origin xyz="0.1 0 0.4" rpy="-1.57 0 -1.57" />
</camera>
</sensor>
<sensor name="camera1" type="camera">
<gz_frame_id>sensor_link</gz_frame_id>
<gz_frame_id>camera_link</gz_frame_id>
<update_rate>10</update_rate>
<topic>camera</topic>
<camera>
Expand Down
27 changes: 19 additions & 8 deletions src/rove_description/worlds/base_world.world
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
<plugin name='gz::sim::systems::SceneBroadcaster' filename='gz-sim-scene-broadcaster-system' />
<plugin name='gz::sim::systems::Contact' filename='gz-sim-contact-system' />


<include>
<pose>3.5 0 0 0 0 0</pose>
<uri> https://fuel.gazebosim.org/1.0/OpenRobotics/models/Pine Tree
</uri>
</include>

<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
Expand Down Expand Up @@ -175,8 +182,9 @@
</box>
</geometry>
<material>

<ambient>1 1 1 1</ambient>
<ambient>1 0 0 1</ambient>
<diffuse>1 0 0 1</diffuse>
<specular>1 0 0 1</specular>
</material>
<meta>
<layer>0</layer>
Expand All @@ -201,8 +209,9 @@
</box>
</geometry>
<material>

<ambient>1 1 1 1</ambient>
<ambient>1 1 0 1</ambient>
<diffuse>1 1 0 1</diffuse>
<specular>1 1 0 1</specular>
</material>
<meta>
<layer>0</layer>
Expand Down Expand Up @@ -253,8 +262,9 @@
</box>
</geometry>
<material>

<ambient>1 1 1 1</ambient>
<ambient>1 0 1 1</ambient>
<diffuse>1 0 1 1</diffuse>
<specular>1 0 1 1</specular>
</material>
<meta>
<layer>0</layer>
Expand Down Expand Up @@ -305,8 +315,9 @@
</box>
</geometry>
<material>

<ambient>1 1 1 1</ambient>
<ambient>0 0 1 1</ambient>
<diffuse>0 0 1 1</diffuse>
<specular>0 0 1 1</specular>
</material>
<meta>
<layer>0</layer>
Expand Down

0 comments on commit fe3f7a9

Please sign in to comment.