Getting Intel Realsense d435 to work in Gazebo
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"
?