laser pattern does not appear when global Fixed Frame = odom
I have installed the rplidar A3 and it functions fine in RViz when testing with the proper command in the terminal.
When I activate the laser with my launch file, and set the global fixed frame to 'odom' (fixed frame connected with the world), then the laser pattern disappears . All the rest Rviz works fine, when I move the robot, the base_link moves accordingly.
Anyone can tell me what I have to change or add in order to see the laser pattern?
I just see I am not allowed to add a print-screen picture, so here are the most important settings:
Global options: Fixed Frame: odom
Grid: Fixed Frame odom
RPLidarLaser Topic: /scan, style: squares, size: 0.03, Position Transformer and Color Transformer are blanked out and cannot be selected
Axes: Reference Frame: base_link
When I set the global fixed frame to laser, then the laser pattern appears but then, of course, the world is connected with the lidar, which is not the idea.
My urdf file:
<?xml version="1.0"?>
<robot name="robot">
<link name="base_link"> <!-- the Vehicle -->
<visual>
<geometry>
<box size="0.6 0.6 0.2"/> <!-- vehicle shape -->
</geometry>
<origin rpy="0.0 0.0 0.0" xyz="0.05 0 -0.1"/> <!-- origin = middle between wheels -->
</visual>
</link>
<link name="laser"> <!-- the Laser -->
<visual>
<geometry>
<cylinder length="0.03" radius="0.05"/> <!-- laser shape -->
</geometry>
<origin rpy="0 0 0" xyz="0.3 0 0.2"/> <!-- origin = cilinder center -->
</visual>
</link>
<joint name="base_link_to_laser" type="fixed"> <!-- laser pos relative to vehicle -->
<parent link="base_link"/>
<child link="laser"/>
<origin xyz="0 -0.22 0.25" rpy = "0 0 0" />
</joint>
</robot>
Thanks a lot