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

EGM is active, but not in running mode (i.e. listening for command references)! #58

Open
dave992 opened this issue Aug 12, 2022 · 1 comment

Comments

@dave992
Copy link

dave992 commented Aug 12, 2022

I am trying to automate starting an EGM session using the abb_robot_driver. I basically follow the steps in the example provided here, using a state machine in Python. Here is a short summary of the calls I perform via the state machine:

rosservice call /rws/stop_rapid "{}"
rosservice call /rws/pp_to_main "{}"
rosservice call /rws/start_rapid "{}"
rosservice call /rws/sm_addin/start_egm_joint "{}"
rosservice call /egm/controller_manager/switch_controller "start_controllers: ......"

There are some race conditions that I take care of by monitoring /rws/system_states, /rws/sm_addin/runtime_states and /egm/egm_states/ before I execute the next service call.

For this issue specifically, I monitor the active field of the message received from the /egm/egm_states topic after executing the service call to /rws/sm_addin/start_egm_joint to check if my request has been processed. If I then try to activate a controller via the /egm/controller_manager/switch_controller service, I sometimes get the following error from the /egm_hardware_interface node:

EGM is active, but not in running mode (i.e. listening for command references)! Refusing to start controller(s): [joint_position_trajectory_controller]

This is another race condition (if I add a sleep, it works), but I wonder how I can make sure EGM is ready to start a controller. How can I monitor if EGM is 'in running mode'?

@gavanderhoorn
Copy link
Member

This one I wouldn't know immediately.

I'd have to check the various state topics to see whether we're already publishing a piece of information which could be used here.

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

No branches or pull requests

2 participants