Ask Your Question

Laser scans rotating with robot while moving robot with teleop

asked 2022-01-14 01:22:21 -0500

Robo_guy gravatar image

updated 2022-01-16 00:28:12 -0500

Hello, I am trying to do autonomous navigation with a real robot. Whenever I move the robot or rotate it with teleop, the laser scans move with the robot. I have checked the tf, it is proper still the problem keeps occurring. Can anyone please tell me what could be the reason for it and how to solve it ?

edit retag flag offensive close merge delete


Please edit your description and explain the problem with more detail - it's unclear what you mean by "the laser scans move with the robot". Are you using rviz or the gazebo GUI? What Fixed Frame have you selected in rviz? Are you using a map? Does the map move when the robot moves, or is the map fixed in place in the rviz window?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-15 09:36:29 -0500 )edit

Ok sorry, so I am using rviz for visualizing the scans and have selected the fixed frame as odom in rviz. Yes, I want to do mapping but first I wanted to check if the tf is set properly for the robot. So whenever I am moving the robot using teleop, the laser scan walls move along with it which should not be happening right. I have checked the tf tree but do not find any issue in that since everything is shown connected in the tf tree. Also when I ticked the tf option in rviz to see the relation between transform of all frames, I noticed that on doing teleop, there is no relative motion between odom and base_footprint. Later on I went ahead with mapping also and noticed that the map does not move with the robot but when I rotate the robot the map starts getting ...(more)

Robo_guy gravatar image Robo_guy  ( 2022-01-15 10:48:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-01-15 11:43:45 -0500

Mike Scheutzow gravatar image

With your config, rviz is transforming each point of the laser scan from the scan frame to the odom frame. This requires that the base_link frame is being updated accurately, because the typical transform chain is scan->base_link->odom.

Your likely problem is that the base_link does not actually match where the physical robot moved, so the rendering of the scan in the rviz window appears wrong.

edit flag offensive delete link more


Ok seems like that is the issue. Actually the lidar sensor is mounted at a height on the robot and is swiveling to create a 3D point cloud after which I am using the octomap server package to get a 2D occupancy grid map. Could thus issue be due to the lidar being mounted at a height and swiveling or as you said it is likely due to mis-match of base_link with the actual physical movement of robot ?

Robo_guy gravatar image Robo_guy  ( 2022-01-15 12:00:25 -0500 )edit

Again, you haven't provided enough information to know how that swiveling relates to the pose of the lidar sensor. The base_link->scan transform must accurately describe the zero-degree ray of the lidar scan.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-15 13:32:17 -0500 )edit

Ok so here are the transforms I am publishing -

1.) Static transform from laser->laser_tilt_plate (the moving plate on which the lidar sensor is mounted). 2.) Python script publishing the rotating transform from laser_tilt_plate->laser_base_plate (the fixed plate to which the moving plate is connected). 3.) Static transform from laser_base_plate->base_link of robot. 4.) Static transform from base_link->base_footprint of robot.

The swivel angle is 45 degrees and the lidar sensor is at -90 degrees yaw orientation just like shown in this image link - The side facing the laptop is the front side in my case.

Robo_guy gravatar image Robo_guy  ( 2022-01-15 23:41:56 -0500 )edit

I don't understand your description of the transforms. The image you linked appears to show a laser beam that rotates around a single axis (the robot's z axis, which points up toward the ceiling.) What does "the swivel angle is 45 degrees" mean?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-16 08:18:15 -0500 )edit

Ok so this is how the lidar is swiveling - Only difference in my case is the lidar is swiveling only 45 degrees from the horizontal position of the moving plate and towards one direction, the side facing the pc screen as can be seen in the link.

Robo_guy gravatar image Robo_guy  ( 2022-01-16 08:35:52 -0500 )edit

OK, thanks - I understand the lidar beam's motion now. Your transforms seem reasonable. I have no more suggestions at this point.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-16 09:50:36 -0500 )edit

Ok thanks, so you are saying there is no issue with the transforms then anything else you think could be causing the issue ? Just a possibility whatever you think could be causing it ?

Robo_guy gravatar image Robo_guy  ( 2022-01-16 10:18:32 -0500 )edit

Does anybody else have a clue what could be causing this issue ? Please let me know, I have been trying to solve this issue since many days.

Robo_guy gravatar image Robo_guy  ( 2022-01-19 23:21:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-01-14 01:22:21 -0500

Seen: 134 times

Last updated: Jan 15