ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Help using epos_hardware

asked 2015-08-21 07:39:49 -0600

maztentropy gravatar image

updated 2015-08-31 02:39:38 -0600

Hello everyone! I am trying to add 4 maxon motors controlled by 4 maxon drives (EPOS2 70/10) and I have been unsuccessful so far. I have communicated with the EPOS2 in Windows and have gone through the initial setup correctly. EDIT: I will summarize the post in order to make it easier to read.

At first I had some USB permission problem which was solved by giving the device special permissions in udev/rules.d. I thought that was not enough and made this post but as ahendrix pointed out probably only by rebooting my computer did the permission change take effect.

I am still trying to make the example work with my own EPOS2 + Motor and the following issue still puzzles me: I have edited the example.yaml file that came with the epos_hardware to fit my motor. Still when I run the example.launch file I get:

[ERROR] [1440402458.067846767]: Could not find motor
[ERROR] [1440402458.067882353]: Could not configure motor: my_joint_actuator
[FATAL] [1440402458.067895978]: Failed to initialize motors

I realized something trying to troubleshoot the problem. My device's serial number is:

Serial Number: 0x662080006193

The package documentation states:

~/motor_name/serial_number (string)

The serial number of the motor (in hex). This is used to locate the motor.

So I have introduced: serial_number: '662080006193'. No problems so far but whenever I try to run the example and check rqt_console I get this ROS_INFO message:

Initializing: 0x7461757463416e6f

Which could be the cause of the problem since to my understanding it is trying to connect to a different device (correct me if I'm wrong). I have tried introducing the number in a variety of ways but I either got the same number (0x7461757463416e6f) or zero (0x0). Does anybody have any clues as to what's happening behind the curtain? Is the number being converted to hex twice? I have tried introducing the decimal equivalent but then I get zero in rqt_console...

Now the latest update I have is I have tried running roswtf with epos_hardware's example.launch file and this is what I get:

ERROR The following packages have rpath issues in manifest.xml:
 * epos_hardware: found flag "-L/opt/ros/indigo/share/controller_manager/lib", but no matching "-Wl,-rpath,/opt/ros/indigo/share/controller_manager/lib"
 * controller_manager: found flag "-L/opt/ros/indigo/share/controller_manager/lib", but no matching "-Wl,-rpath,/opt/ros/indigo/share/controller_manager/lib"

Could this be the source of the problem or at least a part of it? How do I fix it? I have checked package.xml in both epos_hardware and controller_manager but I am not exactly sure about what to do. I have tried commenting the following line in controller_manager's package.xml but although roswtf gave me no errors I still get the same problem when I try to execute the example:

  <export>
    <cpp lflags="-L${prefix}/lib -lcontroller_manager" cflags="-I${prefix}/include"/>
  </export>
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2015-08-31 07:51:03 -0600

maztentropy gravatar image

I sort of made it work for now. As I initially suspected the problem was in the way the serial number is handled internally. I manually changed the file "epos.cpp" and recompiled and the issue was solved. This is the change I did in case anyone is interested:

   if(!config_nh_.getParam("serial_number", serial_number_str)) {
     ROS_ERROR("You must specify a serial number");
     valid_ = false;
  }
  else {

    ROS_ASSERT(SerialNumberFromHex(serial_number_str, &serial_number_));
  }

I changed it to:

config_nh_.getParam("serial_number", serial_number_str);
ROS_ASSERT(SerialNumberFromHex(serial_number_str, &serial_number_));

I think that serial_number_str was not being collected properly but I am no expert. How can I make it known to the author?

edit flag offensive delete link more

Comments

According to the docs the serial nr should be specified in hex, as you had found out. Have you tried setting the parameter to 0x662080006193 (if that is your serial nr in hex)?

As to how to contact the author, use the issue tracker at https://github.com/RIVeR-Lab/epos_har... .

gvdhoorn gravatar image gvdhoorn  ( 2015-08-31 08:31:37 -0600 )edit

I did try that form also, but in the example provided in the package is was entered as '662080006193' that's why I have used it for the post. Thanks for your interest anyway.

maztentropy gravatar image maztentropy  ( 2015-08-31 11:04:38 -0600 )edit

The serial number you have is probably in decimal. Try converting it to hex with the 0x prefix and see if that works. Feel free to add a PR to support both formats of SN. Not sure about the controller_manager issue, but I would try filing a bug against controller_manager

mitchell gravatar image mitchell  ( 2015-09-02 09:52:43 -0600 )edit

I used the serial number obtained from "list_devices" (which I think is already hex). I have anyway tried different ways of inputting the number and none of them worked. The ROS_INFO message which parses the device you're connecting to kept saying "0x7461757463416e6f" or "0x0".

maztentropy gravatar image maztentropy  ( 2015-09-03 02:44:17 -0600 )edit

@maztentropy did you finally get the EPOS work? I'm having the same 3 errors as you.

jdeleon gravatar image jdeleon  ( 2016-06-17 08:33:06 -0600 )edit

I'm running into the same problem here now. However, the exact same code works on a computer running Ubuntu14.04 but failed on another machine running Ubuntu 14.02. If I removed ROS_ASSERT, then it works fine. Any explanation to his?

johnyang gravatar image johnyang  ( 2017-09-13 00:29:21 -0600 )edit
2

answered 2015-08-22 01:54:35 -0600

ahendrix gravatar image

updated 2015-08-24 03:21:42 -0600

I don't have any experience with the epos driver, but this looks like a fairly standard permissions problem.

The general things to do are:

  • Examine the permissions on /dev/bus/usb/003/007 with ls -l /dev/bus/usb/003/007
  • Manually grant permissions to all users for this device: sudo chmod 777 /dev/bus/usb/003/007
  • Confirm that the permissions are now set to read/write for all users: ls -l /dev/bus/usb/003/007
  • Try your node again now that the permissions are less restrictive: rosrun epos_hardware list_devices

If those steps work, then you've confirmed that the permissions are the issue, and you can work on setting up a udev rule to set the permissions correctly in the future.

If those steps don't work, update your question with the output from each command, and I'll help you troubleshoot further.

UPDATE

I suspect that the udev rules you attempted to set up on your first attempt were correct, but they weren't loaded properly until you rebooted; hence why your permissions issue is "magically" gone.

I can't help you with the epos driver itself (no experience there), but the errors suggest that you should carefully check that the names in all of your config files match.

edit flag offensive delete link more

Comments

FYI, You can install the udev rules with this command: rosrun epos_hardware install_udev_rules

bigcmos gravatar image bigcmos  ( 2016-02-04 11:35:06 -0600 )edit
0

answered 2016-02-04 13:04:22 -0600

bigcmos gravatar image

I ran into the same issue. Passed in a valid serial_number in my yaml file serial_number: '0x602068006333' and was getting the output: Initializing: 0x7fc051f597b8.

The answer from @maztentropy doesn't seem to affect any change on my machine.

The problem only exists on my machine with the install of ros-indigo-epos-hardware.

The bug does not exist when I pull from the latest commit of epos_hardware on github ( https://github.com/RIVeR-Lab/epos_har... ). This leads me to believe that there is some fix that hasn't been pushed with the release.

I don't understand when the bug was fixed though, because it looks like there haven't been any significant changes to epos_hardware since the last release on June 18, 2015 ( https://github.com/RIVeR-Lab-release/... ).

edit flag offensive delete link more

Comments

so it works by you, becuase i have also trouble with epos_hardware by using Indigo

Milliau gravatar image Milliau  ( 2016-08-10 06:28:38 -0600 )edit

Question Tools

Stats

Asked: 2015-08-21 07:39:49 -0600

Seen: 2,595 times

Last updated: Feb 04 '16