Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtVincent committed Sep 10, 2023
1 parent c4056ac commit 7ab258f
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion launch/gazebo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="model" default="$(find realsense2_description)/urdf/test_d435_camera.urdf.xacro"/>
<arg name="model" default="$(find realsense_gazebo_plugin)/urdf/test_d435_camera.urdf.xacro"/>
<arg name="name" default="camera" />
<arg name="topics_ns" default="camera" />
<arg name="add_plug" default="false" />
Expand Down
4 changes: 2 additions & 2 deletions launch/view_d435_model.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<launch>
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find realsense2_description)/urdf/test_d435_camera.urdf.xacro' use_nominal_extrinsics:=true add_plug:=true use_mesh:=true" />
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find realsense_gazebo_plugin)/urdf/test_d435_camera.urdf.xacro' use_nominal_extrinsics:=true add_plug:=true use_mesh:=true" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

<arg name="gui" default="True" />
<param name="use_gui" value="$(arg gui)" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense2_description)/rviz/urdf.rviz" required="true" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense_gazebo_plugin)/rviz/urdf.rviz" required="true" />
</launch>
6 changes: 3 additions & 3 deletions launch/view_d435_model_rviz_gazebo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<arg name="topics_ns" default="camera"/>
<arg name="add_plug" default="false"/>
<arg name="publish_pointcloud" default="true"/>
<arg name="model" default="$(find realsense2_description)/urdf/test_d435_camera.urdf.xacro"/>
<arg name="model" default="$(find realsense_gazebo_plugin)/urdf/test_d435_camera.urdf.xacro"/>
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model) use_nominal_extrinsics:=true publish_pointcloud:=$(arg publish_pointcloud) add_plug:=$(arg add_plug) name:=$(arg name) topics_ns:=$(arg topics_ns)" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>

<!-- this will include the launch file for gazebo given the model -->
<include file="$(find realsense2_description)/launch/gazebo.launch">
<include file="$(find realsense_gazebo_plugin)/launch/gazebo.launch">
<arg name="model" value="$(arg model)" />
<arg name="name" default="$(arg name)" />
<arg name="topics_ns" default="$(arg topics_ns)" />
Expand All @@ -22,5 +22,5 @@
<!-- loads rviz -->
<arg name="gui" default="True" />
<param name="use_gui" value="$(arg gui)" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense2_description)/rviz/urdf.rviz" required="true" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense_gazebo_plugin)/rviz/urdf.rviz" required="true" />
</launch>
4 changes: 2 additions & 2 deletions launch/view_d435i_model.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<launch>
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find realsense2_description)/urdf/test_d435i_camera.urdf.xacro' use_nominal_extrinsics:=true" />
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find realsense_gazebo_plugin)/urdf/test_d435i_camera.urdf.xacro' use_nominal_extrinsics:=true" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

<arg name="gui" default="True" />
<param name="use_gui" value="$(arg gui)" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense2_description)/rviz/urdf.rviz" required="true" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense_gazebo_plugin)/rviz/urdf.rviz" required="true" />
</launch>
6 changes: 3 additions & 3 deletions launch/view_d435i_model_rviz_gazebo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<arg name="topics_ns" default="camera"/>
<arg name="add_plug" default="false"/>
<arg name="publish_pointcloud" default="true"/>
<arg name="model" default="$(find realsense2_description)/urdf/test_d435i_camera.urdf.xacro"/>
<arg name="model" default="$(find realsense_gazebo_plugin)/urdf/test_d435i_camera.urdf.xacro"/>
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model) use_nominal_extrinsics:=true publish_pointcloud:=$(arg publish_pointcloud) add_plug:=$(arg add_plug) name:=$(arg name) topics_ns:=$(arg topics_ns)" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>

<!-- this will include the launch file for gazebo given the model -->
<include file="$(find realsense2_description)/launch/gazebo.launch">
<include file="$(find realsense_gazebo_plugin)/launch/gazebo.launch">
<arg name="model" value="$(arg model)" />
<arg name="name" default="$(arg name)" />
<arg name="topics_ns" default="$(arg topics_ns)" />
Expand All @@ -22,5 +22,5 @@
<!-- loads rviz -->
<arg name="gui" default="True" />
<param name="use_gui" value="$(arg gui)" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense2_description)/rviz/urdf.rviz" required="true" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense_gazebo_plugin)/rviz/urdf.rviz" required="true" />
</launch>
4 changes: 2 additions & 2 deletions launch/view_multiple_d435_models.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<launch>
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find realsense2_description)/urdf/test_d435_multiple_cameras.urdf.xacro' use_nominal_extrinsics:=true add_plug:=true" />
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find realsense_gazebo_plugin)/urdf/test_d435_multiple_cameras.urdf.xacro' use_nominal_extrinsics:=true add_plug:=true" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

<arg name="gui" default="True" />
<param name="use_gui" value="$(arg gui)" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense2_description)/rviz/urdf.rviz" required="true" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense_gazebo_plugin)/rviz/urdf.rviz" required="true" />
</launch>
4 changes: 2 additions & 2 deletions urdf/_d435.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aluminum peripherial evaluation case.

<robot name="sensor_d435" xmlns:xacro="http://ros.org/wiki/xacro">
<!-- Includes -->
<xacro:include filename="$(find realsense2_description)/urdf/_d435.gazebo.xacro" />
<xacro:include filename="$(find realsense_gazebo_plugin)/urdf/_d435.gazebo.xacro" />
<xacro:include filename="$(find realsense2_description)/urdf/_materials.urdf.xacro" />
<xacro:include filename="$(find realsense2_description)/urdf/_usb_plug.urdf.xacro" />

Expand Down Expand Up @@ -63,7 +63,7 @@ aluminum peripherial evaluation case.
<!-- the mesh origin is at front plate in between the two infrared camera axes -->
<origin xyz="${d435_zero_depth_to_glass + d435_glass_to_front} ${-d435_cam_depth_py} 0" rpy="${M_PI/2} 0 ${M_PI/2}"/>
<geometry>
<mesh filename="package://realsense2_description/meshes/d435.dae" />
<mesh filename="file://$(find realsense2_description)/meshes/d435.dae" />
</geometry>
</xacro:if>
<xacro:unless value="${use_mesh}">
Expand Down
4 changes: 2 additions & 2 deletions urdf/_d435i.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ aluminum peripherial evaluation case.
-->

<robot name="sensor_d435i" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro"/>
<xacro:include filename="$(find realsense2_description)/urdf/_d435i_imu_modules.urdf.xacro"/>
<xacro:include filename="$(find realsense_gazebo_plugin)/urdf/_d435.urdf.xacro"/>
<xacro:include filename="$(find realsense_gazebo_plugin)/urdf/_d435i_imu_modules.urdf.xacro"/>

<xacro:macro name="sensor_d435i" params="parent *origin name:=camera use_nominal_extrinsics:=false add_plug:=false topics_ns:=camera publish_pointcloud:=false" >
<xacro:sensor_d435 parent="${parent}" name="${name}" use_nominal_extrinsics="${use_nominal_extrinsics}" add_plug="${add_plug}" topics_ns="${topics_ns}" publish_pointcloud="${publish_pointcloud}">
Expand Down
2 changes: 1 addition & 1 deletion urdf/test_d435_camera.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<xacro:arg name="name" default="camera" />
<xacro:arg name="topics_ns" default="camera" />
<xacro:arg name="publish_pointcloud" default="false" />
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" />
<xacro:include filename="$(find realsense_gazebo_plugin)/urdf/_d435.urdf.xacro" />

<link name="base_link" />
<xacro:sensor_d435 parent="base_link" use_nominal_extrinsics="$(arg use_nominal_extrinsics)" add_plug="$(arg add_plug)" use_mesh="$(arg use_mesh)" name="$(arg name)" topics_ns="$(arg topics_ns)" publish_pointcloud="$(arg publish_pointcloud)">
Expand Down
2 changes: 1 addition & 1 deletion urdf/test_d435_multiple_cameras.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<robot name="realsense2_camera" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:arg name="use_nominal_extrinsics" default="false"/>
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" />
<xacro:include filename="$(find realsense_gazebo_plugin)/urdf/_d435.urdf.xacro" />

<link name="base_link" />
<xacro:sensor_d435 parent="base_link" name="camera1" use_nominal_extrinsics="$(arg use_nominal_extrinsics)">
Expand Down
2 changes: 1 addition & 1 deletion urdf/test_d435i_camera.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<xacro:arg name="use_nominal_extrinsics" default="false" />
<xacro:arg name="publish_pointcloud" default="false" />
<xacro:arg name="add_plug" default="false" />
<xacro:include filename="$(find realsense2_description)/urdf/_d435i.urdf.xacro"/>
<xacro:include filename="$(find realsense_gazebo_plugin)/urdf/_d435i.urdf.xacro"/>

<link name="base_link" />
<xacro:sensor_d435i name="$(arg name)" topics_ns="$(arg topics_ns)" parent="base_link" use_nominal_extrinsics="$(arg use_nominal_extrinsics)" publish_pointcloud="$(arg publish_pointcloud)" add_plug="$(arg add_plug)">
Expand Down

0 comments on commit 7ab258f

Please sign in to comment.