Ask Your Question
0

Navigation stack robot rotating only.

asked 2022-04-03 11:18:09 -0500

1024son gravatar image

updated 2022-04-05 04:01:20 -0500

Hello I have posted a few times here as I am new in ROS and robotics but am instructed to use ROS for my FYP,

I have set up my 2wd robot following "https://automaticaddison.com/how-to-s..." tutorial closely. Finish setting up the robot and changed the parameters that are different for my robot compared to his, my root seems to only rotate in-place.

warning below are shown initially during launch but ceased when 2D pose estimate is established.

[ WARN] [1649000364.191098334]: Timed out waiting for transform from base_link to odom to become available before running costmap, tf error: Could not find a connection between 'odom' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.100712 timeout was 0.1.

However, when 2D navigation goalthe robot only rotate intermittently. Looking at the terminal these 2 are shown:

[ WARN] [1649000414.486082369]: Map update loop missed its desired rate of 30.0000Hz... the loop actually took 3.7272 seconds

and

ERROR] [1649000377.601709350]: Error transforming from frame 'imu' to frame 'map'

The laser data does not align with my saved map (by hector slam)image description I tried mapping again after editing the tf of hector slam to match my navigation stack launch file tf but it still comes up to the same issue. Odometry doesnt seem to be an issue as controlling through teleop twist keyboard, echo /left_ticks and /right_ticks is working fine.

Is there anything wrong? Thank you very much!

Update: The laser data and map data are able to aligned now. By setting laser and map in RVIZ with pose estimate first will line up the two before moving with goal pose. With the map aligned, the robot are able to move to the set goal now by turning left and right slowly (only tried straight path ahead). Is this left and right motion due the scanned area object being too big (the black spots in the picture below)? image description

edit retag flag offensive close merge delete

Comments

What parameters are set for your robot? Maybe angular speed is set really low?

ljaniec gravatar image ljaniec  ( 2022-04-03 19:12:10 -0500 )edit

by angular speed i assume you meant the turning speed right? as the diff drive controls are handled by arduino, the parameters are set in there. The PWM values are set at 150 (maximum is 255) and when controlling with teleop_twist keyboard, rotation has no issues. Please let me know if I am wrong about angular speed. Thank you.

1024son gravatar image 1024son  ( 2022-04-04 09:09:10 -0500 )edit

I would try to change the parameters in base_local_planner_params.yaml to slightly higher values - if the behavior of the robot changes, it's a problem with adjusting parameters. If the problem persists I would try to check for other possible problems (maybe parameters for the map cost etc.)

ljaniec gravatar image ljaniec  ( 2022-04-05 04:10:50 -0500 )edit

I see. Will do that and also try tweaking other parameters if issue persist. Thank you!

1024son gravatar image 1024son  ( 2022-04-05 08:14:10 -0500 )edit

I think this PDF could help you with tweaking parameters: https://kaiyuzheng.me/documents/navgu... and of course http://wiki.ros.org/navigation/Troubl...

ljaniec gravatar image ljaniec  ( 2022-04-05 08:41:15 -0500 )edit

Have downloaded it. update soon.

1024son gravatar image 1024son  ( 2022-04-05 11:18:30 -0500 )edit

Hi there, its been a few days and had been reading and tweaking the parameters. It still works the same and have tried: Remapping, slam without map (just laser data), tweaking the base local planner param and also both local/global cost map param. Is there any data/information i can provide from my side to solve this issue? Only an obstacle clear path is navigable and it does so by half left/right towards goal. Thank you very much, guess I will be opening another question as the problem no longer fits the title.

1024son gravatar image 1024son  ( 2022-04-08 10:20:52 -0500 )edit

You can accept this answer and then link in the comment your new question - it would be the best to have the whole project with code and simulation available on GitHub repository or something so we could reproduce your problem on our side :)

ljaniec gravatar image ljaniec  ( 2022-04-09 12:21:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-05 04:31:21 -0500

ljaniec gravatar image

https://ros2-industrial-workshop.read... - there you can read more about the problem with unaligned map after 2D Pose Estimation arrow is drawn

edit flag offensive delete link more

Comments

Thank you. will update again asap. Though I am using ROS and not ROS2, is it still relevant (will still give it a read before you answer)?

1024son gravatar image 1024son  ( 2022-04-05 08:14:22 -0500 )edit

I am sorry, I should check the tags more carefully. ROS-IN has a lot of sources about ROS1 too: https://industrial-training-master.re...

ljaniec gravatar image ljaniec  ( 2022-04-05 08:45:48 -0500 )edit

Thank you.

1024son gravatar image 1024son  ( 2022-04-05 11:18:02 -0500 )edit
1024son gravatar image 1024son  ( 2022-04-09 15:21:57 -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

Stats

Asked: 2022-04-03 11:18:09 -0500

Seen: 122 times

Last updated: Apr 05