How to ensure a service (start_rapid/stop_rapid) is done processing #48
-
For a project, I am trying to automate several motions using the
From the terminal, the abovementioned commands work fine. However, when called in quick succession via a python script, it seems the To illustrate this, here is an example of when a program is still running:
The Should I expect all service requests to be handled asynchronously? If so, is there a way to check when it is done processing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's been a while since I've worked with this specific service, but as a general comment: all RWS services manipulate either the StateMachine program, or another part of the runtime system state of the IRC5 controller. Some services can take longer than others to affect something. So to close the loop (in this case), you'd subscribe to the I can't point you to a message/field for "pp-to-main" specifically right now, but in general I don't believe you can only rely on service results to coordinate / time your sequence. (this is true of ROS services in general btw: all services which do not experience a failure to send over the request and invoke the callback in the server will return So for
at this point you'd know the service was successful, and the system state was updated as requested. Edit: one possible design here would essentially be a client-side statemachine which models controller state (based on information carried by the various topics) and transitions through intermediate states (which trigger the respective services) to end up in the desired state (ie: the-motors-are-on or egm-joint-mode-is-active-and-ready). Edit 2: for |
Beta Was this translation helpful? Give feedback.
It's been a while since I've worked with this specific service, but as a general comment: all RWS services manipulate either the StateMachine program, or another part of the runtime system state of the IRC5 controller.
Some services can take longer than others to affect something. So to close the loop (in this case), you'd subscribe to the
system_states
topic (carrying abb_robot_msgs/msg/SystemState messages), and inspect that state using the fields in that message. Other topics carry the state of other parts of the system (such as whether EGM is active or not, what its state is (converging or not), or in which state the StateMachine currently is).I can't point you to a message/field for…