0
$\begingroup$

Rosanswers logo

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-set-up-the-ros-navigation-stack-on-a-robot/" 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


Originally posted by 1024son on ROS Answers with karma: 7 on 2022-04-03

Post score: 0


Original comments

Comment by ljaniec on 2022-04-03:
What parameters are set for your robot? Maybe angular speed is set really low?

Comment by 1024son on 2022-04-04:
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.

Comment by ljaniec on 2022-04-05:
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.)

Comment by 1024son on 2022-04-05:
I see. Will do that and also try tweaking other parameters if issue persist. Thank you!

Comment by ljaniec on 2022-04-05:
I think this PDF could help you with tweaking parameters: https://kaiyuzheng.me/documents/navguide.pdf and of course http://wiki.ros.org/navigation/Troubleshooting

Comment by 1024son on 2022-04-05:
Have downloaded it. update soon.

Comment by 1024son on 2022-04-08:
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.

Comment by ljaniec on 2022-04-09:
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 :)

Comment by 1024son on 2022-04-09:
will do. Thank you. updated questions: https://answers.ros.org/question/398779/navigation-stack-not-going-straight/

Added GitHub repo as well. https://github.com/roomtempiq/Odroid_bot

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

https://ros2-industrial-workshop.readthedocs.io/en/latest/_source/navigation/ROS2-Navigation.html#navigate-the-robot-via-rviz - there you can read more about the problem with unaligned map after 2D Pose Estimation arrow is drawn


Originally posted by ljaniec with karma: 3064 on 2022-04-05

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by 1024son on 2022-04-05:
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)?

Comment by ljaniec on 2022-04-05:
I am sorry, I should check the tags more carefully. ROS-IN has a lot of sources about ROS1 too: https://industrial-training-master.readthedocs.io/en/latest/

Comment by 1024son on 2022-04-05:
Thank you.

Comment by 1024son on 2022-04-09:
updated question: https://answers.ros.org/question/398779/navigation-stack-not-going-straight/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.