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

Unexpected results when retrieving EGM settings when sm_addin/rapid is not running #59

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. To make sure I write valid EGM settings, I first retrieve the current settings and then rewrite the fields I am interested in.

Depending on the timing of my request to the /rws/sm_addin/get_egm_settings service to retrieve the current EGM setting I get different results. If I request the settings before RAPID is running (and therefore the state machine addin), I get back 'empty' settings.

The service result does however return a result code of result_code: 1, indicating the service call was successful. This is not the case if I for example provide it with the wrong task name, then I do get an indication that something went wrong via the result_code but I also receive the 'empty' settings.

Invalid EGM settings returned via service
allow_egm_motions: False
use_presync: False
setup_uc: 
  use_filtering: False
  comm_timeout: 0.0
activate: 
  tool: 
    robhold: False
    tframe: 
      trans: 
        x: 0.0
        y: 0.0
        z: 0.0
      rot: 
        q1: 0.0
        q2: 0.0
        q3: 0.0
        q4: 0.0
    tload: 
      mass: 0.0
      cog: 
        x: 0.0
        y: 0.0
        z: 0.0
      aom: 
        q1: 0.0
        q2: 0.0
        q3: 0.0
        q4: 0.0
      ix: 0.0
      iy: 0.0
      iz: 0.0
  wobj: 
    robhold: False
    ufprog: False
    ufmec: ''
    uframe: 
      trans: 
        x: 0.0
        y: 0.0
        z: 0.0
      rot: 
        q1: 0.0
        q2: 0.0
        q3: 0.0
        q4: 0.0
    oframe: 
      trans: 
        x: 0.0
        y: 0.0
        z: 0.0
      rot: 
        q1: 0.0
        q2: 0.0
        q3: 0.0
        q4: 0.0
  correction_frame: 
    trans: 
      x: 0.0
      y: 0.0
      z: 0.0
    rot: 
      q1: 0.0
      q2: 0.0
      q3: 0.0
      q4: 0.0
  sensor_frame: 
    trans: 
      x: 0.0
      y: 0.0
      z: 0.0
    rot: 
      q1: 0.0
      q2: 0.0
      q3: 0.0
      q4: 0.0
  cond_min_max: 0.0
  lp_filter: 0.0
  sample_rate: 0
  max_speed_deviation: 0.0
run: 
  cond_time: 0.0
  ramp_in_time: 0.0
  offset: 
    trans: 
      x: 0.0
      y: 0.0
      z: 0.0
    rot: 
      q1: 0.0
      q2: 0.0
      q3: 0.0
      q4: 0.0
  pos_corr_gain: 0.0
stop: 
  ramp_out_time: 0.0

Adjusting these settings and writing them back to the controller does not allow to start the EGM session (also without any indication).

If I delay my call of /rws/sm_addin/get_egm_settings till the State Machine Addin is running, I do get back valid results that I can use to write my own settings.

Would it be possible for the /rws/sm_addin/get_egm_settings service to indicate if it is called in an invalid state (e.g. the State Machine Addin is not running)?

@gavanderhoorn
Copy link
Member

Would it be possible for the /rws/sm_addin/get_egm_settings service to indicate if it is called in an invalid state

seems like something that could be added.

The code already checks a few pre-conditions though (here). We'd need to make sure it's not already checking the sm runtime state.

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