ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Lidar data is reflected 180 degrees.

asked 2022-04-05 06:21:41 -0600

Dr.Modi gravatar image

Hello everyone I use Slamtec S1 lidar in conjunction with Jetson Nano running Ubuntu 18 and ROS2 Eloquent. I'm using the sllidar_ros2 package and everything looks great. But when I added lidar to my urdf file, in rviz2 I see that lidar data is displayed the other way around. I also have ZED 2, with which I get an IMU, it is also added to urdf and thanks to it my robot is moving in the right direction. However, I don't understand what is wrong with lidar, how can I turn it?

Here is a part of the urdf description with lidar, it is located in the front part of the robot, along with ZED2. Unfortunately, I can't attach files yet, but rviz2 shows as if there is a wall in front of my robot's face and a large space behind, although in reality it's the opposite.

  <!-- Robot Lidar -->  
  <link name="laser">
    <visual>
      <origin xyz="0 0 0.0255" rpy="0 0 0" />
      <geometry>
        <cylinder radius="0.0225" length="0.051"/>
      </geometry>
      <material name="black">
        <color rgba="0 0 0 1" />
      </material>
    </visual>
  </link>

  <joint name="lidar_joint" type="fixed">
    <parent link="base_link"/>
    <child link="laser"/>
    <origin xyz="0.4425 0 0.40" rpy="0 0 0" />
  </joint>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2022-04-05 06:51:29 -0600

Mike Scheutzow gravatar image

You probably have not correctly specified the yaw for the fixed lidar_joint. For a urdf joint, the order of operation is translate then rotate. Try setting yaw to 3.14159 (radians).

http://wiki.ros.org/urdf/XML/joint

edit flag offensive delete link more

Comments

Oh, great! It works, thank you very much!

Dr.Modi gravatar image Dr.Modi  ( 2022-04-05 07:07:03 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-05 06:21:41 -0600

Seen: 665 times

Last updated: Apr 05 '22