(Un)docking action never finishes #131
-
I'm currently experimenting with the automated docking and undocking of the robot. My undocking function looks like this: Undock action
Within the statemachine, the LED changes colors to see the states but it never reaches the State.UNDOCKED.
Sometimes, if I'm waiting long enough, a docking routine can be performed after a undocking routine but the action never provides a result. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It is definitely possible to have an action dock/undock file that takes advantage of callbacks, but if you're looking for a more simple way, take a look at this script. If you want to keep the same structure you're working with, try throwing in some print statements to find where it's getting stuck. We used classes and a main function at the end to organize it. This way you can spin the node and then shut it down when you're done - possibly avoiding confusion within itself. Additionally, it may be helpful to break your isDockComplete function into two: goal response callback and get result callback. |
Beta Was this translation helpful? Give feedback.
-
I defer to @kwujciak 's reply above as a primary answer. I also have encountered dock/undock actions "hanging" or never finishing. It seems to improve when I switch from cycloneDDS to fastRTPS or vice-versa. Worth a try! |
Beta Was this translation helpful? Give feedback.
It is definitely possible to have an action dock/undock file that takes advantage of callbacks, but if you're looking for a more simple way, take a look at this script.
If you want to keep the same structure you're working with, try throwing in some print statements to find where it's getting stuck. We used classes and a main function at the end to organize it. This way you can spin the node and then shut it down when you're done - possibly avoiding confusion within itself. Additionally, it may be helpful to break your isDockComplete function into two: goal response callback and get result callback.