Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Adding Intel Camera To Robot Sensor

Hello All,

I am using ROS Melodic and Gazebo 9.13.

I am trying to visualise a 6 DOF robot (like the UR5) with the Intel Depthsense camera attached to the end-effector.

My problem: I can't seem to attach the camera to the wrist_3_link of the robot

Can you point out what is wrong with the way I am adding the camera to the robot's link?

What I tried:

the launch file:

<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />

<param name="robot_description" command="$(find xacro)/xacro '$(find ur_description)/urdf/ur5_joint_limited_robot.urdf.xacro' transmission_hw_interface:=$(arg transmission_hw_interface)" />

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_ur5" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" />

<!-- Add the Intel realsense to the UR5 End Effector -->
<param name="realsense2_camera" command="$(find xacro)/xacro  '$(find camera)/urdf/ur5realsense.xacro' use_nominal_extrinsics:=true" />

<!-- push camera to gazebo -->
<node name="spawn_camera" pkg="gazebo_ros" type="spawn_model" args="-urdf -param realsense2_camera -model camera -x 1 -y 1 -z 0" respawn="false" output="screen" />

the wroking(?) xacro:

  <robot name="realsense2_camera" xmlns:xacro="">
  <xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" />

  <link name="base_link" />
  <sensor_d435 parent="base_link">
    <origin xyz="0 0 0" rpy="0 0 0"/>

the xacro that fails:

<?xml version="1.0"?>
<robot name="realsense2_camera" xmlns:xacro="">
  <xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" />

  <link name="camera_link" />
  <sensor_d435 parent="camera_link">
    <origin xyz="0 0 0" rpy="0 0 0"/>

  <joint name="camerajoint" type="fixed">
    <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
    <parent link="wrist_3_link"/>
    <child link="camera_link"/>
    <axis xyz="0.0 0.0 0.0"/>
    <limit lower="0.0" upper="0.0" effort="0.0" velocity="0.0"/>



Thank you.