Gazebo | Ignition | Community
Ask Your Question

intel realsense sr300 in simulation

asked 2018-04-19 20:08:33 -0500

lr101095 gravatar image

gazebo 7, ros kinetic, ubuntu 16.04

is a simulation for the intel realsense sr300 available in gazebo 7? i understand that the kinect would be a good substitute in simulation, but i have access to a the real sr300 camera and i was planning on making comparisons between simulation and the real output from the camera.

if anyone has any suggestions, it would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-23 11:08:05 -0500

shreeyak gravatar image

updated 2018-04-23 11:26:21 -0500

Yes, a google search does reveal that there are some models available for simulation of the realsense camera. See these links:

To know more about plugins in Gazebo, take a look at the official Tutorial: Using Gazebo plugins with ROS.

That said, for most applications, you can probably use the generic DepthCam or Kinect plugin. I've been using the Asus Xtion Pro simulation of the camera, based on the plugin, for emulating a realsense camera and it's working well. I based it on a project from the book Effective Robotics Programming with ROS.

To make this plugin emulate your camera, modify the elements in the <sensors> tag withing the <gazebo> tag to provide parameters like your horizontal FOV, minimum depth, maximum depth, etc. I've left those parameters default in my simulation but have modified the topic names to be the same as my actual camera. See my files below.

Here is the xtion_pro_live.gazebo.xacro file. Note that I replaced the mesh files with a realsense mesh, from the links above. <robot xmlns:xacro=""> <xacro:include filename="$(find robot_description)/urdf/deg_to_rad.xacro"/>

  <xacro:macro name="xtion_pro_live_rgbd_camera_gazebo" params="name">
    <gazebo reference="${name}_link">


      <!-- RGB + Depth -->
      <sensor type="depth" name="${name}_frame_sensor2">

          <horizontal_fov>${58.0 * deg_to_rad}</horizontal_fov>

        <plugin name="${name}_frame_controller" filename="">

Here is the xtion_pro_live.urdf.xacro file:

<robot xmlns:xacro="">

  <xacro:include filename="$(find robot_description)/urdf/sensors/xtion_pro_live.gazebo.xacro"/>
  <xacro:include filename="$(find robot_description)/urdf/deg_to_rad.xacro"/>

  <xacro:macro name="dummy_inertial">
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.001"/>
      <inertia ixx="0.00001" ixy="0" ixz="0"
               iyy="0.00001" iyz="0"

  <xacro:macro name="xtion_pro_live" params="name parent_link *origin *optical_origin">

    <!-- frames in the center of the camera -->
    <joint name="${name}_joint" type="fixed">
      <xacro:insert_block name="origin"/>
      <parent link="${parent_link}"/>
      <child link="${name}_link"/>

    <link name="${name}_link">
        <origin xyz="-0.00936000000 -0.00003000000 -0.00273000000" rpy="0 0 0"/>
        <mass value="0.21970000000"/>
        <inertia ixx="0.00000429247" ixy="0.00000000000" ixz="0.00000002565"
                 iyy="0.00000008027" iyz="0.00000000000"
        <origin xyz="0 0 0" rpy="0 0 0"/>
          <mesh filename="package://robot_description/meshes/realsense/intel_d415.dae"/>
        <material name="DarkGrey ...
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-04-19 20:08:33 -0500

Seen: 2,066 times

Last updated: Apr 23 '18