Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ray sensor not showing on urdf robot


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" />
    <mass value="1.2" />
    <inertia ixx="0.00108747" iyy="0.00108747" izz="0.00109244" ixy="0" ixz="0" iyz="0"/>
  <collision name="base_collision">
      <cylinder radius="0.04267" length="0.029335" />
  <visual name="base_visual">
    <pose frame="">0 0 -0.029335 0 -0 0</pose>
      <mesh filename="model://mower_description/meshes/velodyne_base.dae" />
<link name="velodyne_top">
  <origin xyz="0 0 0.095455" rpy="0 0 0" />
    <mass value="0.1" />
    <inertia ixx="0.000090623" iyy="0.000090623" izz="0.000091036" ixy="0" ixz="0" iyz="0" />
  <collision name="top_collision">
      <cylinder radius="0.04267" length="0.07357" />
  <visual name="top_visual">
      <mesh filename="model://mower_description/meshes/velodyne_top.dae"/>
<gazebo reference="velodyne_base">
 <gazebo reference="velodyne_top">
  <sensor name="sensor" type="ray">
    <pose frame=''>0 0 -0.004645 0 -0 0</pose>

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" />

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 ray.

Have anyone tried this before?