HELP: adding logical_camera sensor to my robot causes strange effect!

asked 2017-12-05 07:52:33 -0600

federico.nardi gravatar image

updated 2017-12-06 03:50:39 -0600

Hi all,

I'm using gazebo 7 to simulate a differential drive robot. Following the ROS tutorials online, I created an urdf file to describe my robot:

If I launch an empty world:

roslaunch gazebo_ros empty_world.launch

and then I spawn the robot with this launch file:

everything goes fine.

image description

Now, I wrote a simple plugin for the logical_camera sensor:

and I try to mount it on the robot by adding these lines to the urdf:

  <link name="logical_camera_link">
      <origin xyz="0 0 0" rpy="0 0 0"/>
    <box size="${camera_size} ${camera_size} ${camera_size}"/>
      <origin xyz="0 0 0" rpy="0 0 0"/>
    <box size="${camera_size} ${camera_size} ${camera_size}"/>
      <material name="red"/>

      <mass value="1e-5" />
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />

  <joint name="logical_camera_joint" type="fixed">
    <axis xyz="0 1 0" />
    <origin xyz="0 0 1.0" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="logical_camera_link"/>

  <gazebo reference="logical_camera_link">
      <sensor name="logical_camera" type="logical_camera">
        <plugin name="logical_camera_plugin" filename=""/>



If I now spawn the robot, this is what happens:

Basically, it seems that the ground plane gets shifted up of one meter.

Can please someone explain me what is happening?


edit retag flag offensive close merge delete


Woah! Does the ground plane pose change on the left panel? How about the model pose and the GUI camera pose? Interestingly the world origin visuals seem to move up, but the grid stays below.

chapulina gravatar imagechapulina ( 2017-12-07 15:41:28 -0600 )edit