ROBOTIS-GIT / turtlebot3

ROS packages for Turtlebot3
http://turtlebot3.robotis.com
Apache License 2.0
1.5k stars 1.03k forks source link

Costmap2D transform timeout problem #78

Closed alirezaahmadi closed 6 years ago

alirezaahmadi commented 7 years ago

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)

routiful commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

alirezaahmadi commented 7 years ago

I did some times but nothing changed !!!

routiful commented 7 years ago

:)

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 commented 7 years ago
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:

alirezaahmadi commented 7 years ago

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 commented 7 years ago

:)

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 commented 7 years ago

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 commented 7 years ago

Okay, i see. Thanks.

Did you connect Wifi when you using RP3?

alirezaahmadi commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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 commented 6 years ago

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

ltelang commented 6 years ago

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

cs2r commented 6 years ago

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

robotpilot commented 6 years ago

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 commented 6 years ago

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

routiful commented 6 years ago

Hi :)

Check this FAQ in WIKI

http://emanual.robotis.com/docs/en/platform/turtlebot3/faq/#timesync-between-turtlebot3-and-remotepc

Thanks.

tinsky commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

tinsky commented 6 years ago

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

ProfJust commented 3 years ago

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 commented 2 years ago

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 commented 1 year ago

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:

Found 1 error(s).

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

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