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

Getting Intel Realsense d435 to work in Gazebo

asked 2021-07-07 10:55:43 -0600

jakb2403 gravatar image

updated 2021-11-14 09:36:20 -0600

lucasw gravatar image

Hi, I'm new to ROS and I wanted to incorporate the d435 camera into my SLAM project. At the moment I'm trying to get the camera to show up in Gazebo and show the pointcloud in Rviz. I found this tutorial on Youtube and followed all the steps outlined. They are making use of the ros-realsense/realsense2_description package from here and the realsense_gazebo_plugin from here. He uses a _d435.gazebo.xacro file which I found here.

I got most of the way there, I can catkin_make my packages fine, but cannot launch the Gazebo and Rviz windows to visualise the camera. When I type $ roslaunch realsense2_description view_d435_model_rviz_gazebo.launch I get the following error message:

Invalid parameter "publish_pointcloud"
when instantiating macro: sensor_d435 (/home/john/catkin_ws/src/realsense-ros/realsense2_description/urdf/_d435.urdf.xacro)
in file: /home/john/catkin_ws/src/realsense-ros/realsense2_description/urdf/test_d435_camera.urdf.xacro
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', '/home/john/catkin_ws/src/realsense-ros/realsense2_description/urdf/test_d435_camera.urdf.xacro', 'use_nominal_extrinsics:=true', 'add_plug:=true']] returned with code [2]. 

Param xml is <param name="robot_description" command="$(find xacro)/xacro $(arg model) use_nominal_extrinsics:=true add_plug:=true"/>
The traceback for the exception was written to the log file

Here is my test_d435_camera.urdf.xacro file:

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

  <link name="base_link" />
  <xacro:sensor_d435 name="camera" topics_ns="camera" parent="base_link" publish_pointcloud="true">
    <origin xyz="0 0 0" rpy="0 0 0"/>
  </xacro:sensor_d435>
</robot>

Is the error here in line 5 where I have publish_pointcloud="true"?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-11-03 09:07:45 -0600

houhao gravatar image

https://github.com/pal-robotics/reals...

You might find the solution over there. And double check you have catkin make the gazebo plugin package.

edit flag offensive delete link more
0

answered 2022-01-28 15:47:51 -0600

bhooshan_deshpande gravatar image

Hi, please refer to this video and change files accordingly. I resolved my issue easily.

https://www.youtube.com/watch?v=hpUCG...

edit flag offensive delete link more

Comments

1

Can you please update your answer with the relevant information from the video? External links can and often do go down

jayess gravatar image jayess  ( 2022-01-30 14:46:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-07-07 10:55:43 -0600

Seen: 5,470 times

Last updated: Jan 28 '22