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

Laser Scanner Rotation when the robot is moving

asked 2022-01-16 18:51:20 -0500

Ciprian gravatar image

updated 2022-01-17 10:37:17 -0500

Hello there everyone,

I am running into an issue with the navigation stack with move base and AMCL in ROS. The issue is, every time the robot rotates by a certain degree, the laser also rotates and stays rotated.

I do not know exactly what to do to fix it. I have tried the following: - changing the wheel separation and wheel radius to correspond to the URDF model, as well as increased it to see the behaviour with other values. These values have been changed in the differential drive controller yaml file. - changed wheel separation multiplier in the differential drive controller yaml file. - changed odometry method from diff_drive_controller to P3D gazebo plugin. - changed the laser from a hokuyo model to an l3s, with different parameters (rays, update freq, angle etc). - rostopic echo on the odometry to check that I am getting values. - changing robot model size (with and without wheel separation changes).

One interesting thing to note is that if the robot moves forward or backwards, there are no issues. Which makes me think the issue is the odometry, but I have changed so many things I don't even know what to do.

On another note, the robot does reach the navigation goal, however, there will be open paths where because of the weird laser scanner, it will think there are walls/obstacles so it will not move to certain places.

If I launch a Turtlebot3, everything works well there, so it's not an issue with the map or the ros noetic installation. Any help would be appreciated.

Here is a video of the problem: YouTube Video

edit retag flag offensive close merge delete

Comments

I also have this problem , how did you solve it ?

Davies Ogunsina gravatar image Davies Ogunsina  ( 2023-02-19 12:38:40 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-01-20 16:23:48 -0500

Ciprian gravatar image

I fixed it after 40 hours of wasted time in trying to get the diff_drive to work, by switching to a skid_drive gazebo plugin, this was giving me good odometry values, but was extremely slow.

Then after even more hours, I used an omni_steering, with a planar_move.so controller, an it was working, but it was sliding on the map rather than moving correctly, because my base wasn't omni-wheel. I added 2 more wheels and made it 8 total, 4 on each side, and now it works perfectly fine. Extremely weird problem and fix.

edit flag offensive delete link more
2

answered 2022-01-17 20:59:57 -0500

cst0 gravatar image

It seems to me that this is not a problem with the laser, it's a problem with the odometry. The reason I think this is because, from your video, the relationship between the laser scans and the current position of the robot relative to the walls is actually correct. However, the perceived laser data is then projected and appears rotated (as you've noticed). To me, this indicates that the laser is actually performing correctly, and the problem is actually about why the robot is perceiving itself as being in the incorrect location.

Try checking the differences in rotation in particular (teleop_twist_keyboard will help with this). The video makes it appear as though the perceived rotations are about half of the actual rotations, so is it possible that you have specified a radius where you should have specified a diameter (or visa-versa)? Or, is it possible that the rotations-per-minute you're specifying the wheels move at are not what you think they are?

As a side note, the diff_drive_controller will attempt to find a lot of values on its own (via the urdf) if you don't specify them in the yaml file, so it might be worth removing things and seeing what happens there.

edit flag offensive delete link more

Comments

Hey thanks for your answer. I have also noticed in the meantime while waiting for an answer here that the problem is from the Odometry not being correct. I checked with teleop, and it seems that even if moving forward and backwards it will be a bit less that the actual movement (let's say if it moves 1m in Gazebo, in RVIZ it moved 80cm).

As for the "RPM", I have never specified this, where should I do that? I only have stuff like "max velocity, max acceleration etc.".

Also would you say if I am to dedicate time to fix it, to continue with diff_drive_controller or should I change to the P3D plugin which provides odometry data. I also have an IMU in my code, but I am not using that, would there be a way to implement the IMU with the diff_drive_Controller if it helps with the data?

Ciprian gravatar image Ciprian  ( 2022-01-18 10:14:34 -0500 )edit

The RPM would be managed by your implementation in ros_control. The diff_drive_controller is a very standard method for controlling differential drive robots, and is what most people will be using so I would keep using that. I haven't heard of p3d before.

cst0 gravatar image cst0  ( 2022-01-18 11:02:55 -0500 )edit

This is how my Ros control plugin looks. Should I change anything?

<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotnamespace>/</robotnamespace> <controlperiod>0.001</controlperiod> <legacymodens>false</legacymodens> </plugin> </gazebo>

Ciprian gravatar image Ciprian  ( 2022-01-18 13:26:23 -0500 )edit

That seems to be a gazebo plugin, and gazebo is a physics simulator, so I don't see how that would fix a problem with how your robot is implemented.

cst0 gravatar image cst0  ( 2022-01-18 13:29:04 -0500 )edit

Ah I see. I will then continue my research with the diff_drive_controller values to find the according ones

Ciprian gravatar image Ciprian  ( 2022-01-18 17:26:59 -0500 )edit

I have spent about 7 hours today, and around 25 total, messing with the odometry trying to get it to be correct. I have gotten the forward and backwards movement to be accurate. I think I'll just accept defeat on this and call it a day.

Ciprian gravatar image Ciprian  ( 2022-01-18 22:33:02 -0500 )edit

So I was able to fix it by going from a diff drive to a skid drive. However now my robot is extremely slow. And I have tried so many things and I cannot make it go fast, nor can I design a Yaml file for it.

Do you have any experience or resources for a skid drive controller? Scoured the whole internet

Ciprian gravatar image Ciprian  ( 2022-01-20 14:15:59 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-01-16 18:51:20 -0500

Seen: 849 times

Last updated: Jan 20 '22