|
11 | 11 | camera_downward |
12 | 12 | "> |
13 | 13 |
|
14 | | - <xacro:if value="$(arg use_rgb_camera)"> |
15 | | - <xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" /> |
16 | | - <xacro:if value="$(arg camera_downward)"> |
17 | | - <xacro:sensor_d435 |
18 | | - parent="base_link" |
19 | | - use_nominal_extrinsics="false" |
20 | | - add_plug="false" |
21 | | - use_mesh="true"> |
22 | | - <origin xyz="0.08 0.0 0.055" rpy="0 ${DOWNWARD_CAMERA_ANGLE} 0"/> |
23 | | - </xacro:sensor_d435> |
| 14 | + <xacro:if value="$(arg use_rgb_camera)"> |
| 15 | + <xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" /> |
| 16 | + <xacro:if value="$(arg camera_downward)"> |
| 17 | + <xacro:sensor_d435 |
| 18 | + parent="base_link" |
| 19 | + use_nominal_extrinsics="false" |
| 20 | + add_plug="false" |
| 21 | + use_mesh="true"> |
| 22 | + <origin xyz="0.08 0.0 0.055" rpy="0 ${DOWNWARD_CAMERA_ANGLE} 0"/> |
| 23 | + </xacro:sensor_d435> |
| 24 | + </xacro:if> |
| 25 | + |
| 26 | + <xacro:unless value="$(arg camera_downward)"> |
| 27 | + <xacro:sensor_d435 |
| 28 | + parent="base_link" |
| 29 | + use_nominal_extrinsics="false" |
| 30 | + add_plug="false" |
| 31 | + use_mesh="true"> |
| 32 | + <origin xyz="0.08 0.0 0.055" rpy="0 0 0"/> |
| 33 | + </xacro:sensor_d435> |
| 34 | + </xacro:unless> |
| 35 | + |
| 36 | + <xacro:if value="${use_gazebo}"> |
| 37 | + <gazebo> |
| 38 | + <plugin filename="ignition-gazebo-sensors-system" name="ignition::gazebo::systems::Sensors"> |
| 39 | + <render_engine>ogre2</render_engine> |
| 40 | + </plugin> |
| 41 | + </gazebo> |
| 42 | + |
| 43 | + <gazebo reference="camera_link"> |
| 44 | + <sensor name="camera_link" type="camera"> |
| 45 | + <update_rate>30.0</update_rate> |
| 46 | + <always_on>true</always_on> |
| 47 | + <ignition_frame_id>camera_link</ignition_frame_id> |
| 48 | + <xacro:if value="${camera_downward}"> |
| 49 | + <pose>0 0 0 0 ${DOWNWARD_CAMERA_ANGLE} 0</pose> |
| 50 | + </xacro:if> |
| 51 | + <xacro:unless value="${camera_downward}"> |
| 52 | + <pose>0 0 0 0 0 0</pose> |
| 53 | + </xacro:unless> |
| 54 | + <topic>/camera/color/image_raw</topic> |
| 55 | + <camera name="rgb_camera"> |
| 56 | + <horizontal_fov>1.20428</horizontal_fov> |
| 57 | + <image> |
| 58 | + <width>1920</width> |
| 59 | + <height>1080</height> |
| 60 | + <format>R8G8B8</format> |
| 61 | + </image> |
| 62 | + <clip> |
| 63 | + <near>0.02</near> |
| 64 | + <far>300</far> |
| 65 | + </clip> |
| 66 | + </camera> |
| 67 | + </sensor> |
| 68 | + </gazebo> |
| 69 | + </xacro:if> |
24 | 70 | </xacro:if> |
25 | | - |
26 | | - <xacro:unless value="$(arg camera_downward)"> |
27 | | - <xacro:sensor_d435 |
28 | | - parent="base_link" |
29 | | - use_nominal_extrinsics="false" |
30 | | - add_plug="false" |
31 | | - use_mesh="true"> |
32 | | - <origin xyz="0.08 0.0 0.055" rpy="0 0 0"/> |
33 | | - </xacro:sensor_d435> |
34 | | - </xacro:unless> |
35 | | - </xacro:if> |
36 | | - |
37 | | - <xacro:if value="${use_gazebo}"> |
38 | | - <gazebo> |
39 | | - <plugin filename="ignition-gazebo-sensors-system" name="ignition::gazebo::systems::Sensors"> |
40 | | - <render_engine>ogre2</render_engine> |
41 | | - </plugin> |
42 | | - </gazebo> |
43 | | - |
44 | | - <gazebo reference="camera_link"> |
45 | | - <sensor name="camera_link" type="camera"> |
46 | | - <update_rate>30.0</update_rate> |
47 | | - <always_on>true</always_on> |
48 | | - <ignition_frame_id>camera_link</ignition_frame_id> |
49 | | - <xacro:if value="${camera_downward}"> |
50 | | - <pose>0 0 0 0 ${DOWNWARD_CAMERA_ANGLE} 0</pose> |
51 | | - </xacro:if> |
52 | | - <xacro:unless value="${camera_downward}"> |
53 | | - <pose>0 0 0 0 0 0</pose> |
54 | | - </xacro:unless> |
55 | | - <topic>/camera/color/image_raw</topic> |
56 | | - <camera name="rgb_camera"> |
57 | | - <horizontal_fov>1.20428</horizontal_fov> |
58 | | - <image> |
59 | | - <width>1920</width> |
60 | | - <height>1080</height> |
61 | | - <format>R8G8B8</format> |
62 | | - </image> |
63 | | - <clip> |
64 | | - <near>0.02</near> |
65 | | - <far>300</far> |
66 | | - </clip> |
67 | | - </camera> |
68 | | - </sensor> |
69 | | - </gazebo> |
70 | | - </xacro:if> |
71 | | -</xacro:macro> |
| 71 | + </xacro:macro> |
72 | 72 |
|
73 | 73 | </robot> |
0 commit comments