Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Costmap2D transform timeout problem #78

Closed
alirezaahmadi opened this issue Aug 29, 2017 · 31 comments
Closed

Costmap2D transform timeout problem #78

alirezaahmadi opened this issue Aug 29, 2017 · 31 comments
Labels

Comments

@alirezaahmadi
Copy link

alirezaahmadi commented Aug 29, 2017

Hi
I have implemented all instructions right as you've said in tutorials, and every thing was ok until I ran the navigation's example, which it loads the map but does not view the costmap2D and gives an warning like this:
[ WARN] [1503985578.700748532]: Costmap2DROS transform timeout. Current time: 1503985578.7007, global_pose stamp: 1503985533.6728, tolerance: 0.2000
I've changed the tolerance timeout but it did nothing on this issue.
as I have this problem the robot does not move whenever I set a 2D Goal. (thats logical because the costmap2D does not exist !!!)
I would really appreciate if anyone could help me to solve this problem.
Thanks
(I have a burger, Turtlebot 3)

@alirezaahmadi alirezaahmadi changed the title Costmap2D timeout problem Costmap2D transform timeout problem Aug 29, 2017
@routiful
Copy link

Hi :)

Would you check frequency of tf topics using below commands.
$ rostopic hz /tf

OpenCR publishes tf topics in 30Hz. So, If the frequency is significantly different, check your OpenCR and network environments.

Thanks.
Darby

@alirezaahmadi
Copy link
Author

alirezaahmadi commented Aug 29, 2017

Thanks for answering ....

I checked it, it responses this way :
alireza@ubuntu:~$ rostopic hz /tf
subscribed to [/tf]
average rate: 28.052
min: 0.000s max: 0.146s std dev: 0.05273s window: 19
average rate: 140.834
min: 0.000s max: 0.146s std dev: 0.01860s window: 243
average rate: 177.587
min: 0.000s max: 0.146s std dev: 0.01330s window: 484
average rate: 194.925
min: 0.000s max: 0.146s std dev: 0.01093s window: 726
average rate: 203.740
min: 0.000s max: 0.146s std dev: 0.00954s window: 962
average rate: 211.368
min: 0.000s max: 0.146s std dev: 0.00856s window: 1211
average rate: 216.040
min: 0.000s max: 0.163s std dev: 0.00967s window: 1454
average rate: 218.366
min: 0.000s max: 0.163s std dev: 0.01153s window: 1681
average rate: 220.356
min: 0.000s max: 0.163s std dev: 0.01288s window: 1923

also, I 've checked the odom's frequency which is close t 30Hz.
is there any problem with my tf topic, which it's frequency is not equal to 30Hz ???

@routiful
Copy link

I think average rate is fine.
How about reset your OpenCR and restart RP3?

@alirezaahmadi
Copy link
Author

I did some times but nothing changed !!!

@routiful
Copy link

:)

Did you set time sync between your laptop PC and RP3?
This commands help you.

$ sudo apt-get install -y chrony ntpdate
$ sudo ntpdate ntp.ubuntu.com

@alirezaahmadi
Copy link
Author

alirezaahmadi commented Aug 29, 2017

screen shot 2017-08-29 at 13 14 19

screen shot 2017-08-29 at 13 15 39

:) same result !!!
is there any old package, which I could test??
the local and global costmaps do not publish!!! (could be something wrong with the move_base package?!! )

I found this by running "roswtf" !!! how I have to run them, could you guide me ??

Found 1 error(s).

ERROR The following nodes should be connected but aren't:

  • /move_base->/move_base (/move_base/global_costmap/footprint)
  • /move_base->/move_base (/move_base/local_costmap/footprint)

@alirezaahmadi
Copy link
Author

I tested it without the RP3, and worked correctly!!
I think my problem is with my Network connection ...
is there any important thing about Network??

Thanks ..

@routiful
Copy link

:)

How to test it without the RP3? Did you use other SBC?
I think your network environments between PC and RP3 is fine.
However, I doubt if there is a problem with the time sink.
Below link will helps you
Time Sink

Thanks
Darby

@alirezaahmadi
Copy link
Author

I mean, I tested the packages and nodes all running on one laptop... which they worked correcly.. I just wanted to make sure, there is no problem with them..
:)

@routiful
Copy link

routiful commented Sep 1, 2017

Okay, i see. Thanks.

Did you connect Wifi when you using RP3?

@alirezaahmadi
Copy link
Author

Yes I connect with Wifi.
I tried chrony, it did nothing, also I tested the time differences between two machines (PR3 and my laptop) it answered like this:
alireza@ubuntu:~$ ntpdate -q 192.168.1.3
server 192.168.1.3, stratum 0, offset 0.000000, delay 0.00000
31 Aug 21:04:18 ntpdate[31891]: no server suitable for synchronization found

I have to set the server to solve this warning , yes?

1 similar comment
@alirezaahmadi
Copy link
Author

Yes I connect with Wifi.
I tried chrony, it did nothing, also I tested the time differences between two machines (PR3 and my laptop) it answered like this:
alireza@ubuntu:~$ ntpdate -q 192.168.1.3
server 192.168.1.3, stratum 0, offset 0.000000, delay 0.00000
31 Aug 21:04:18 ntpdate[31891]: no server suitable for synchronization found

I have to set the server to solve this warning , yes?

@alirezaahmadi
Copy link
Author

I have set servers on my laptop but, in RP3 the chrony gives my this error "506 Cannot talk to daemon" whenever I call its sources by "chrony sources". do you have any idea for this problem??

@ltelang
Copy link

ltelang commented Nov 2, 2017

Ali,

Did you ever end up solving the error...
[ WARN] [1509638125.580617453]: Costmap2DROS transform timeout. Current time: 1509638125.5806, global_pose stamp: 1455209088.3206, tolerance: 1.0000

I have the exact same problem as you...went through the right steps for bringup, teleoperation etc.. but then I come to set a 2D nav goal and it gives me that error. My 2D coast map has to be missing. I am unsure how to manipulate the frequency that you talked about above

please help!

@alirezaahmadi
Copy link
Author

actually, no... I just tried to make all system clocks same... and it worked, but it wasn't a stable solution.. chrony doesn't work on raspberry pi, I don't know why... and it's gave me the error "506 Cannot talk to daemon"..

@ltelang
Copy link

ltelang commented Nov 2, 2017

So I just went in manually on my RP3 went System menu>Administration>Time and Date> unlocked it using my password and changed the time.

It got rid of that Cost2DROS transform timeout error and I get a new one:
[ WARN] [1509644376.618270534]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.101057 timeout was 0.1.

This might not even be progress, i have no clue, but it's something different have you tried just manually changing it?

@jrjennings
Copy link

I have ran into the same problem with my turtlebot 3 , the time difference is huge and it always happens when the network doesn't have an internet connection but work fine when I do.

after running
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map1.yaml

any ideas?

@jrjennings
Copy link

jrjennings commented Nov 8, 2017

Adding a real time clock to the Raspberry Pi worked for me. https://ubuntu-mate.community/t/supporting-ds3231-rtc-source-synchronise-with-network-time/5711

@ltelang
Copy link

ltelang commented Nov 9, 2017

I am going to try adding the real clock and then get back to you on this jrjennings

@ltelang
Copy link

ltelang commented Nov 9, 2017

I have ordered a couple of the DS3231 chips, so it may take a couple days before I can test this

@cs2r
Copy link

cs2r commented Nov 14, 2017

I have the same problem with turtlebot33-waffle any solutions???

@robotpilot
Copy link
Member

This issue will be closed since there were no actions for a while.
You can reopen this issue to show this issue to the users whenever.
Thanks. :)

@tinsky
Copy link

tinsky commented May 23, 2018

I have the same problem with turtlebot3-waffle. any solutions?

@routiful
Copy link

@tinsky
Copy link

tinsky commented May 24, 2018

thx for your reply!
I have tried ntpdate to synchronize time of turtlebot and remote PC. but it did nothing.
To make sure the time of turtlebot and remote PC is synchronized, I even set up a ntp server on the remote PC and use ntpd on turtlebot to update time. but it also did nothing.

Maybe is the problem with my network connection?
Because I don't have any good enough Wi-Fi to connect, I set up an Access Point mode Wi-Fi hotspot on my remote PC and make turtlebot connect the hotspot.
So every time I run the navigation's example, the network doesn't have the Internet connection.

any ideas?

appreciate your help!

@jrjennings
Copy link

Have you tried using chrony to synchronize? I've been running my burger without an internet connection using chrony. I had to do some fiddling with the config files to get it working. Isolated networks at the bottom of this page was helpful https://chrony.tuxfamily.org/doc/3.3/chrony.conf.html

@tinsky
Copy link

tinsky commented May 25, 2018

thx for your advice!
I will try it as soon as possible to see whether it works for my waffle.
appreciate your help!

@tinsky
Copy link

tinsky commented May 28, 2018

@jrjennings
it does works!! thank you very much.

@ProfJust
Copy link

I had the same issue using the SR04-Sonar-Sensor .
Therefore I uncommented the sonar-functions in the turtlebot-core-source in line 145 etc.

With
$ rostopic hz /tf
you can check the frequency.
If the Distance is to long or there is no Sensor connected the /tf-frequency decreases to below 1Hz.

@BENBEY-I
Copy link

BENBEY-I commented Jun 3, 2022

I had the same problem and solved it by setting the time manually for the PC and the robot, I used this command "sudo date -s 'YYYY-MM-DD HH:MM:SS' " to set the raspberry time.

@LOKAKSHAI
Copy link

I'm also getting this error

Found 1 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:

  • /amcl:
    • /initialpose
  • /move_base:
    • /move_base_simple/goal
    • /map_updates

Found 1 error(s).

ERROR The following nodes should be connected but aren't:

  • /move_base->/move_base (/move_base/global_costmap/footprint)
  • /move_base->/move_base (/move_base/local_costmap/footprint

I tried changing the global frame from map to odom, but the error still remains. How to fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants