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

get_safety_configuration freezes with the latest controller firmware #44

Open
kirillmorozov opened this issue May 16, 2024 · 0 comments

Comments

@kirillmorozov
Copy link

What happened?

We have updated our H2017 robot to the latest firmware GF02110201 and our application that uses DRFL API stopped working.

During the troubleshooting I was able to pin down the problem to the get_safety_configuration method call.

I have also noticed that during the first boot after the update a message that tells something like "safety stop modes were update" is displayed, I think it might be related.

If I roll back to GV02110100 the problem goes away.

Steps to reproduce

Launch this snippet:

#include <chrono>
#include <iostream>
#include <ostream>
#include <string>
#include <thread>

#include "include/DRFLEx.h"

const std::string IP_ADDRESS = "192.168.137.100";

bool g_bHasControlAuthority = FALSE;

// This function is copied from DRFL examples with some of the lines commented
// out.
void OnMonitroingAccessControlCB(
    const MONITORING_ACCESS_CONTROL eTrasnsitControl) {
  switch (eTrasnsitControl) {
  case MONITORING_ACCESS_CONTROL_REQUEST:
    break;
  case MONITORING_ACCESS_CONTROL_GRANT:
    g_bHasControlAuthority = TRUE;
    break;
  case MONITORING_ACCESS_CONTROL_DENY:
  case MONITORING_ACCESS_CONTROL_LOSS:
    g_bHasControlAuthority = FALSE;
    break;
  default:
    break;
  }
}

int main() {
  DRAFramework::CDRFLEx robot;
  auto version = robot.get_library_version();
  std::cout << "Library version: " << version << std::endl;
  robot.set_on_monitoring_access_control(OnMonitroingAccessControlCB);
  bool success = robot.open_connection(IP_ADDRESS);
  if (!success) {
    std::cout << "Cannot open connection to robot @ " << IP_ADDRESS
              << std::endl;
    return 1;
  }
  SYSTEM_VERSION sysver;
  success = robot.get_system_version(&sysver);
  if (success) {
    std::cout << "Opened connection to " << sysver._szRobotModel
              << " controller version: " << sysver._szController << " @ "
              << IP_ADDRESS << " " << std::endl;
  }
  std::this_thread::sleep_for(std::chrono::milliseconds(1000));
  success = robot.manage_access_control(MANAGE_ACCESS_CONTROL_FORCE_REQUEST);
  if (!success) {
    std::cout << "Cannot get access control" << std::endl;
    return 1;
  }
  while (!g_bHasControlAuthority) {
  }
  std::cout << "Access control granted" << std::endl;
  std::cout << "Getting safety configuration" << std::endl;
  auto safety_configuration = robot.get_safety_configuration();
  std::cout << "Got safety configuration" << std::endl;
  robot.close_connection();
  std::cout << "Connection closed" << std::endl;
  return 0;
}

Versions

  • DRFL: GL010118
  • Controller: GF02110201
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

1 participant