Ray sensor not showing on urdf robot
Hello,
I don't know if this is the right place to post this question, but this issue is driving me crazy. I couldn't solve it myself and thought I could run it over with everyone here, see if someone had the same issue.
I have created a URDF model of my robot following gazebo tutorial. This robot has a Velodyne sensor at the front, the mesh is showing, and it is somehow rotating when I press play, the ray is not showing. I do not know if I have written something wrong because the sensor tag is showing on gazebo when I select the Velodyne link, but the ray is not showing at all. Is it normal? I have not connected to my ROS project yet, and I do not know how to check if I am getting data otherwise (first time using Gazebo).
This is the part of the URDF where the Velodyne is, it is inside <robot> tag
<link name="velodyne_base"> <origin xyz="0 0 0.029335" rpy="0 0 0" /> <inertial> <mass value="1.2" /> <inertia ixx="0.00108747" iyy="0.00108747" izz="0.00109244" ixy="0" ixz="0" iyz="0"/> </inertial> <collision name="base_collision"> <geometry> <cylinder radius="0.04267" length="0.029335" /> </geometry> </collision> <visual name="base_visual"> <pose frame="">0 0 -0.029335 0 -0 0</pose> <geometry> <mesh filename="model://mower_description/meshes/velodyne_base.dae" /> </geometry> </visual> </link> <link name="velodyne_top"> <origin xyz="0 0 0.095455" rpy="0 0 0" /> <inertial> <mass value="0.1" /> <inertia ixx="0.000090623" iyy="0.000090623" izz="0.000091036" ixy="0" ixz="0" iyz="0" /> </inertial> <collision name="top_collision"> <geometry> <cylinder radius="0.04267" length="0.07357" /> </geometry> </collision> <visual name="top_visual"> <geometry> <mesh filename="model://mower_description/meshes/velodyne_top.dae"/> </geometry> </visual> </link> <gazebo reference="velodyne_base"> <static>true</static> </gazebo> <gazebo reference="velodyne_top"> <sensor name="sensor" type="ray"> <pose frame=''>0 0 -0.004645 0 -0 0</pose> <update_rate>20</update_rate> <ray> <noise> <type>gaussian</type> <mean>0</mean> <stddev>0.1</stddev> </noise> <scan> <horizontal> <samples>96</samples> <resolution>1</resolution> <min_angle>-1.54898</min_angle> <max_angle>1.54898</max_angle> </horizontal> <vertical> <samples>8</samples> <resolution>1</resolution> <min_angle>-0.139626</min_angle> <max_angle>0.139626</max_angle> </vertical> </scan> <range> <min>0.1</min> <max>70</max> <resolution>0.02</resolution> </range> </ray> </sensor> </gazebo>
And this is the joint between the velodyne links
<joint name="velodyne_joint" type="revolute"> <parent link="velodyne_base" /> <child link="velodyne_top" /> <limit lower="-1e+16" upper="1e+16" effort="-1" velocity="-1" /> <origin xyz="0 0 0.05867" rpy="0 -0 0" /> <axis xyz="0 0 1" /> </joint>
The sensor tag on the code, I also tried just adding it by not using <gazebo> tag, as urdf supports it, but still nothing showing the ray working area that I specified. When I open gazebo and insert the Velodyne sensor SDF model by itself, it shows the working area, but once I insert my URDF robot model, the sensor on it does not show any ...