PointCloud from velodyne in rviz
Hello all!
I am trying to add a velodyne sensor (VLP-16) to an UAV (the iris model in px4).
I know that there are more questions on it but as far as I understood them, I don't have their issues.
I can see the sensor in Gazebo, it's frame is connected to the fixed frame (see tf tree image below), it is receiving messages, the status is ok in Rviz but I cannot see anything. I already made the question to the px4 people but thought someone here might know what am I missing.
So in my urdf I have
<xacro:include filename="/opt/ros/kinetic/share/velodyne_description/urdf/VLP-16.urdf.xacro"/>
<VLP-16 parent="base_link" name="unicorn" topic="/velodyne_points" hz="10" samples="440" lasers="5" max_range="10" min_angle="-2.35619" max_angle="2.35619">
<origin xyz="0 0 1" rpy="0 0 0" />
</VLP-16>
Here is the tf tree (the parent is base_link and unicorn is on the bottom left):
And here is Rviz
The launch is their posix_sitl.launch plus robot and joint publisher:
<launch>
<!-- Posix SITL environment launch script -->
<arg name="x" default="0"/>
<arg name="y" default="0"/>
<arg name="z" default="0"/>
<arg name="R" default="0"/>
<arg name="P" default="0"/>
<arg name="Y" default="0"/>
<arg name="est" default="lpe"/>
<arg name="vehicle" default="iris"/>
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>
<arg name="rcS" default="$(find px4)/posix-configs/SITL/init/$(arg est)/$(arg vehicle)"/>
<arg name="headless" default="false"/>
<arg name="gui" default="true"/>
<arg name="ns" default="/"/>
<arg name="debug" default="false"/>
<arg name="verbose" default="false"/>
<arg name="paused" default="false"/>
<node name="sitl" pkg="px4" type="px4" output="screen"
args="$(find px4) $(arg rcS)">
</node>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="headless" value="$(arg headless)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="world_name" value="$(arg world)" />
<arg name="debug" value="$(arg debug)" />
<arg name="verbose" value="$(arg verbose)" />
<arg name="paused" value="$(arg paused)" />
</include>
<param name="robot_description" textfile="/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="$(anon vehicle_spawn)" output="screen" pkg="gazebo_ros" type="spawn_model"
args="-urdf -param /robot_description -model iris -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/>
</launch>
Here is what the gazebo looks like