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

Slow Action Server Response #497

Open
LuHaofan opened this issue Dec 30, 2023 · 1 comment
Open

Slow Action Server Response #497

LuHaofan opened this issue Dec 30, 2023 · 1 comment

Comments

@LuHaofan
Copy link

I recently ordered a turtlebot4 standard for my research, which has an create 3 base. I am trying to drive my turtlebot with the action server using the instructions in the documentation. Specifically, I call this command in my CLI:

ros2 action send_goal /drive_distance irobot_create_msgs/action/DriveDistance \
"distance: 0.5
max_translation_speed: 0.3"

The prompt shows: Waiting for an action server to become available...
And then it takes 20~30 seconds before I actually get a response from the robot and it starts to move.
This delay is way too long for my application to bear and I wonder how to deal with this issue?

Here is some additional information about my setup and debugging process:

  1. I am using a WLAN network where only one turtlebot is present.
  2. I am using ROS2 Humble and the latest firmware from the irobot create3 website: H.2.3
  3. My operating system is Ubuntu 22.04 and all software packages have been updated to the latest version.
  4. I have sync the clock on my PC and Rasp Pi and icreate 3 using NTP. (But I still see user.notice ntpd: ntpd: reply from [192.168.186.3](http://192.168.186.3/): delay 0.004474 is too high, ignoring in the create 3 log. Not sure how to fix it...)
  5. I tried both CLI and rclpy action client. The delays are similar, both 20~30 seconds.
  6. I log the time at which the goal request is sent and the create3 receives the goal message. The delay between these two is around 20~30 seconds. After the goal message is received, the robot starts actuating quickly.
  7. I tried the other action servers available on create 3 and all of them suffer from this delay issue.
  8. I wrote an action server myself and ran it on a Rasp Pi in the same network and interacted with it using the same way. The delay is negligible.
  9. I monitor the WiFi traffic and notice that create 3 has a lot of uplink data (0.6Mbps) and fewer downlink data (3 kbps) from the create3 robot. This throughput should not saturate the channel and cause the delay issue.

I have searched on the internet but could not find a similar issue. Any help would be appreciated

Thank you so much for your help!

@slowrunner
Copy link

@LuHaofan, Disclaimer: I am just a Create3 owner. What follows is my personal opinion.

Haofan, you have "discovered" a secret: There are many things the Create3 performs at 62 to 100 times per second, and a few things on the order of seconds per request, efficiently interleaved by a processor slightly more powerful than what might be considered a micro-controller operating at 70 to 80% and sometimes even 100% CPU at 70% of 59MB available memory.

The driving action servers are useful for initial learning in ROS 2, but have some disadvantages for complex robot environments, such as:

  • The IR sensors will fail to "see black obstacles" - (affects /wall_follow action server most)
  • The action servers will ignore /cmd_vel messages coming from an external processor that is more aware of the environment

The "slow initiation" of the Create3 native action servers is likely not something that will (or can) be addressed by the iRobot team. If the action servers are useful, great, if not the distributed nature of ROS allows fast, external action servers tailored to users' needs.

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

No branches or pull requests

2 participants