기존 URDF 모델에 RGBD Camera 추가하기. (Intel D435 모델)
관련 패키지 설치
$ sudo apt install ros-melodic-realsense2-description
URDF 파일에 D435 카메라 추가
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" />
...
<xacro:sensor_d435 parent="mount_box" use_nominal_extrinsics="$(arg use_nominal_extrinsics)">
<origin xyz="-0.37 0 0.435" rpy="0 0 ${pi}"/>
</xacro:sensor_d435>
upload_robot.lauch 파일 수정 (카메라 관련 파라미터 추가)
<launch>
<param name="robot_description" command="$(find xacro)/xacro $(find mobile_manipulator_robot_description)/urdf/robot.urdf.xacro use_nominal_extrinsics:=true add_plug:=false" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"/>
<node pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" name="joint_state_publisher"/>
</launch>
MoveIt Setup Assistant에서 3D Perception 부분 추가
(xacro option 추가: use_nominal_extrinsics:=true add_plug:=false)
저장 후 종료.
catkin_ws/src/learn-ros1/mobile_manipulator_robot_moveit_config/config/sensors_3d.yaml
# The name of this file shouldn't be changed, or else the Setup Assistant won't detect it
sensors:
- filtered_cloud_topic: filtered_cloud
max_range: 5.0
max_update_rate: 5
padding_offset: 0.1
padding_scale: 1.0
point_cloud_topic: camera/depth_registered/points
point_subsample: 1
sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater