ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hey i found out. First download this package and put it into your catkinws src folder and then compile the catkin package. This will generate a shared library called librealsense_gazebo_plugin.so for you which is used in the files you gonna download in the next steps. you need to download the two xacro files https://github.com/pal-robotics-forks/realsense/tree/upstream/realsense2_description/urdf _d435.gazebo.xacro and _d435.urdf.xacro put those two files in the package inside the urdf folder where you want your realsense to be simulated then in the file _d435.urdf.xacro change the line 13 from <xacro:include filename="$(find realsense2_description)/urdf/r435.gazebo.xacro"/> to packagename with being the name of the package <xacro:include filename="$(find packagename)/urdf/r435.gazebo.xacro"/> Then in the urdf file where you want to use the simulated realsense add the following code, while again replacing packagename with the name of the package you are using. and baselink which the link where you want the realsense camera to be joint on. <xacro:include filename="$(find packagename)/urdf/_d435.urdf.xacro"/> <sensor_d435 parent="${prefix}base_link">

</sensor_d435> Afterwards when you launch file which uses this urdf model you will find the simulate realsense and you should see rostopics like /camera/color/image_raw

Hey i found out. out how to at least use D435. First download this package from https://github.com/pal-robotics/realsense_gazebo_plugin and put it into your catkinws src folder and then compile the catkin package. This will generate a shared library called librealsense_gazebo_plugin.so for you which is used in the files you gonna download in the next steps. you need to download the two xacro files https://github.com/pal-robotics-forks/realsense/tree/upstream/realsense2_description/urdf _d435.gazebo.xacro and _d435.urdf.xacro put those two files in the package inside the urdf folder where you want your realsense to be simulated then in the file _d435.urdf.xacro change the line 13 from <xacro:include filename="$(find realsense2_description)/urdf/r435.gazebo.xacro"/> to packagename with being the name of the package <xacro:include filename="$(find packagename)/urdf/r435.gazebo.xacro"/> Then in the urdf file where you want to use the simulated realsense add the following code, while again replacing packagename with the name of the package you are using. and baselink which the link where you want the realsense camera to be joint on. <xacro:include filename="$(find packagename)/urdf/_d435.urdf.xacro"/> <sensor_d435 parent="${prefix}base_link">

</sensor_d435> Afterwards when you launch file which uses this urdf model you will find the simulate realsense and you should see rostopics like /camera/color/image_raw

Hey i found out how to at least use D435. First download this package from https://github.com/pal-robotics/realsense_gazebo_plugin and put it into your catkinws src folder and then compile the catkin package. This will generate a shared library called librealsense_gazebo_plugin.so for you which is used in the files you gonna download in the next steps. you need to download the two xacro files https://github.com/pal-robotics-forks/realsense/tree/upstream/realsense2_description/urdf _d435.gazebo.xacro and _d435.urdf.xacro put those two files in the package inside the urdf folder where you want your realsense to be simulated then in the file _d435.urdf.xacro change the line 13 from <xacro:include filename="$(find realsense2_description)/urdf/r435.gazebo.xacro"/> realsense2_description)/urdf/urdf _d435.gazebo.xacro"/> to packagename with being the name of the package <xacro:include filename="$(find packagename)/urdf/r435.gazebo.xacro"/> packagename)/urdf/urdf _d435.gazebo.xacro"/> Then in the urdf file where you want to use the simulated realsense add the following code, while again replacing packagename with the name of the package you are using. and baselink which the link where you want the realsense camera to be joint on. <xacro:include filename="$(find packagename)/urdf/_d435.urdf.xacro"/> <sensor_d435 parent="${prefix}base_link">

</sensor_d435> Afterwards when you launch file which uses this urdf model you will find the simulate realsense and you should see rostopics like /camera/color/image_raw

Furthermore in the file urdf _d435.gazebo.xacro file in line 139 you can change the parameter to true so you will get the point cloud you want.