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

error when try op3_manager with XM540-W270-R #50

Closed
msaufyrohmad opened this issue Jul 20, 2018 · 35 comments
Closed

error when try op3_manager with XM540-W270-R #50

msaufyrohmad opened this issue Jul 20, 2018 · 35 comments
Assignees
Labels

Comments

@msaufyrohmad
Copy link

hi
i try op3 manager with set of 15 xm540 servos.

i already change the .robot file and add XM-540.device file.

but when i try to run the op3manager with op3_manager.launch, this message appear.

process[op3_localization-2]: started with pid [26270]
[ERROR] [1532100652.615660890]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.651648647]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.687631622]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.723618992]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.759606870]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.895751751]: Fail to control LED [[RxPacketError] Unknown error code!]
/dev/ttyACM0 added. (baudrate: 57600)
(/dev/ttyACM0) [ID: 1] XM-540 added.
(/dev/ttyACM0) [ID: 2] XM-540 added.
(/dev/ttyACM0) [ID: 3] XM-540 added.
(/dev/ttyACM0) [ID: 4] XM-540 added.
(/dev/ttyACM0) [ID: 5] XM-540 added.
(/dev/ttyACM0) [ID: 6] XM-540 added.
(/dev/ttyACM0) [ID: 7] XM-540 added.
(/dev/ttyACM0) [ID: 8] XM-540 added.
(/dev/ttyACM0) [ID: 9] XM-540 added.
(/dev/ttyACM0) [ID: 10] XM-540 added.
(/dev/ttyACM0) [ID: 11] XM-540 added.
(/dev/ttyACM0) [ID: 12] XM-540 added.
(/dev/ttyACM0) [ID: 13] XM-540 added.
(/dev/ttyACM0) [ID: 14] XM-540 added.
(/dev/ttyACM0) [ID: 15] XM-540 added.
(/dev/ttyACM0) [ID:200] OPEN-CR added.
[ INFO] [1532100654.028718785]: Load offsets...
[ WARN] [1532100654.348599766]: Head control - angle unit : 30
[ERROR] [1532100655.314481806]: [RobotisController] first bulk read fail!!
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::lock_error >'
what(): boost: mutex lock failed in pthread_mutex_lock: Invalid arguu ment
[adam_manager-1] process has died [pid 26241, exit code -6, cmd /home/husein/catkin_ws/devel/lib/adam_manager/adam_manager __name:=adam_manager __log:=/home/husein/.ros/log/7ff5bac6-8c2e-11e8-a852-240a64b1d379/adam_manager-1.log].
log file: /home/husein/.ros/log/7ff5bac6-8c2e-11e8-a852-240a64b1d379/adam_manager-1*.log

I think i already change what suppose to change, but i study here.

thanks You very much

saufy

@kaym9n kaym9n self-assigned this Jul 22, 2018
@kaym9n
Copy link
Member

kaym9n commented Jul 22, 2018

Hello.

[ERROR] [1532100652.615660890]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.651648647]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.687631622]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.723618992]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.759606870]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.895751751]: Fail to control LED [[RxPacketError] Unknown error code!]

Upper Error means that you don't use OPEN-CR whose ID for communication is 200.
Please refer the link.

[ERROR] [1532100655.314481806]: [RobotisController] first bulk read fail!!
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::lock_error >'

And second one has 2 solution.

  1. Get superuser privilege while maintaining the bash environment please.

    $ sudo bash
    
  2. Follow the Other settings of the PC Setting please.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Jul 26, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Jul 27, 2018

If you have an another plan for power control and sensor not using OpenCR, you don't have to use OpenCR. UsbToDxnamixel is enough.
In the case of ROBOTIS-OP3, we used OpenCR in order to control the power source.
It's a system block diagram of ROBOTIS-OP3. and please refer to the control table of OpenCR.

200 is a default ID of OpenCR in the firmware for ROBOTIS-OP3.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Jul 27, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Jul 30, 2018

I see. I finally know what is different between you and I.
We used OpenCR like a dynamixel under the U2D2 in ROBOTIS-OP3.
/dev/ttyUSB0 is a portname of U2D2. This is a communication structure of ROBOTIS-OP3.

PC - U2D2 - OpenCR (200)
          - Dynamixel (1)
          - Dynamixel (2)
          - ...

Maybe it will work if you change the robot file and a launch file. The developer of OpenCr is in vacation until next week.
Could you test following method.

  1. change a robot file
    • open a OP3.robot file.
    • replace /dev/ttyUSB0 to /dev/ttyACM0.
  2. change a launch file
    • open a op3_manager.launch file.
    • replace /dev/ttyUSB0 to /dev/ttyACM0.

When my colleague comes back next week, I'll ask him that whether it is possible to communicate with OpenCR and dynamixels using micro usb port of OpenCR under the firmware for ROBOTIS-OP3.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 1, 2018 via email

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 1, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 1, 2018

Yes, you can use USB2Dynamixel instead of U2D2.

Q1 : If you want to use function of power control or sensor(gyro, accelermeter), you have to download a firmware for ROBOTIS-OP3 into OpenCR. (emanual)

Q2 : you don't have to do anything.

Good luck.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 1, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 1, 2018

I don't know what is problem.

Could you give me a photo of your hardware configuration? I want to see it.
And please give me your robot file too.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 1, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 1, 2018

I think there is no problem in the robot file.

How about checking ID, baud rate, protocol version of dynamixels?
They have to be same between a robot file and dynamixels.

I'll test it in the similar condition and let you know the result.

@kaym9n
Copy link
Member

kaym9n commented Aug 1, 2018

It works for me.
This is my test condition.

  • dynamixels
    • XM540-W150
      • ID : 1
      • baudrate : 2000000
    • XM540-W270
      • ID : 2
      • baudrate : 2000000
  • robot file
[ control info ]
control_cycle = 8   # milliseconds

[ port info ]
# PORT NAME  | BAUDRATE  | DEFAULT JOINT
/dev/ttyUSB0 | 2000000   | r_sho_pitch

[ device info ]
# TYPE    | PORT NAME    | ID  | MODEL          | PROTOCOL | DEV NAME       | BULK READ ITEMS
dynamixel | /dev/ttyUSB0 | 1   | XM540-W150     | 2.0      | r_sho_pitch    | present_position, position_p_gain, position_d_gain, position_i_gain
dynamixel | /dev/ttyUSB0 | 2   | XM540-W270     | 2.0      | l_sho_pitch    | present_position, position_p_gain, position_d_gain, position_i_gain
sensor    | /dev/ttyUSB0 | 200 | OPEN-CR        | 2.0      | open-cr        | button, present_voltage, gyro_x, gyro_y, gyro_z, acc_x, acc_y, acc_z, roll, pitch, yaw

  • execution screen
    image
  • HW configuration
    image

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 1, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 2, 2018

What kind of method did you use for master and slave?
Is it using direct cable or secondary id?

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 2, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 2, 2018

In my case, both of putting all servos to robot file and putting only masters are working.

I am wondering why number of slave is bigger than number of master.
As I know, master and slave are connected one by one.

For now, I suspect that the firmware of OpenCR has been downloaded well.

  • robot file
[ control info ]
control_cycle = 8   # milliseconds

[ port info ]
# PORT NAME  | BAUDRATE  | DEFAULT JOINT
/dev/ttyUSB0 | 2000000   | r_sho_pitch

[ device info ]
# TYPE    | PORT NAME    | ID  | MODEL          | PROTOCOL | DEV NAME       | BULK READ ITEMS
dynamixel | /dev/ttyUSB0 | 1   | XM540-W150     | 2.0      | r_sho_pitch    | present_position, position_p_gain, position_d_gain, position_i_gain
dynamixel | /dev/ttyUSB0 | 2   | XM540-W270     | 2.0      | l_sho_pitch    | present_position, position_p_gain, position_d_gain, position_i_gain
dynamixel | /dev/ttyUSB0 | 3   | XM540-W270     | 2.0      | l_sho_pitchS   | present_position, position_p_gain, position_d_gain, position_i_gain
sensor    | /dev/ttyUSB0 | 200 | OPEN-CR        | 2.0      | open-cr        | button, present_voltage, gyro_x, gyro_y, gyro_z, acc_x, acc_y, acc_z, roll, pitch, yaw
  • HW configuration
    image

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 3, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 3, 2018

Ubuntu 16.04 is fine as well. it also looks no problem there are one master and two slaves.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 3, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 6, 2018

There is no log file.
But If you change the flag for debug mode in robotis_controller.cpp, you can see the more log in the screen.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 6, 2018 via email

@robotpilot
Copy link
Member

I'm going to close this until you update the issue with more information. If you do so I'll reopen the issue. Thanks.

@kaym9n
Copy link
Member

kaym9n commented Aug 20, 2018

Hi robotis,

I am sorry i dont use github to post this issue. Because the thread already closed while i dont know what is the issue with my ROS configuration.

I use op3_manager and change the .robot, .yaml and offset.yaml files to follow my configuration.

Everything is the same with op3 manual and setup (except i use usb2dynamixel) instead of U2D2.

i use 15 XM540-W270 servos in series. The motor is tested with normal C program and it works.

When i run the op3_manager, the torque is enabled but the ping command failed.

this is the output:

[ INFO] [1534231410.306879754]: Torque on DXLs!
[ INFO] [1534231410.418860378]: LED OK

/dev/ttyUSB0 added. (baudrate: 2000000)
(/dev/ttyUSB0) [ID: 1] XM-540-W270 added.
(/dev/ttyUSB0) [ID: 2] XM-540-W270 added.

..

..
..
..
(/dev/ttyUSB0) [ID: 14] XM-540-W270 added.
(/dev/ttyUSB0) [ID: 15] XM-540-W270 added.
(/dev/ttyUSB0) [ID:200] OPEN-CR added.
[ERROR] [1534231410.549930366]: JOINT[head_yaw] does NOT respond!!
[ERROR] [1534231410.628273609]: JOINT[r_ank_pitch] does NOT respond!!
[ERROR] [1534231410.706590507]: JOINT[r_ank_pitchS] does NOT respond!!

I really stuck and i dont know what is the real problem. I hope robotis can help me. We bought a lot of XM540-W270 from robotis and i hope robotis can give support and help on this.

thank you very much,

saufy

@kaym9n
Copy link
Member

kaym9n commented Aug 20, 2018

Can I see the picture of your hardware?
I don't know what thr problem is for now.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 23, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 24, 2018

Did LED of Dynamixels blink when you run the manager.launch file?
Otherwise, power was not supplied to the Dynamixel.

And I think your hardware configuration is fine. You have to debug using modifing the source code. (ex. robotis_controller)

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 24, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Aug 28, 2018

When the power is on, the servo LED blinks once. Will you check when it blinks?
In normal condition, LED blinks once when you run the manager.launch file.
At the beginning of the manager, we send a packet to OpenCR to turn on dynamixel. Then the LED will blink. If it does not blink then OpenCR seems to have a problem.

And I want to see the picture of your robot.
Using text alone will not help you anymore.

@msaufyrohmad
Copy link
Author

msaufyrohmad commented Aug 30, 2018 via email

@kaym9n
Copy link
Member

kaym9n commented Sep 3, 2018

When the power is on, the servo LED blinks once. Will you check when it
blinks?

No, the servos not blink at all

It's impossible. AN XM540's LED also blinks when power is supplied. I think that the problem is about power.

The picture of series of servos is fine. Could you upload the image to this issue or send me via e-mail?
I can't see the images you uploaded before.

@robotpilot
Copy link
Member

This issue will be closed since there were no actions for a while. You can reopen this issue to show this issue to the users whenever. Thanks.

@luqmansen
Copy link

If you have another plan for power control and sensor not using OpenCR, you don't have to use OpenCR. UsbToDxnamixel is enough.
In the case of ROBOTIS-OP3, we used OpenCR in order to control the power source.
It's a system block diagram of ROBOTIS-OP3. and please refer to the control table of OpenCR.

Hello, regarding this statement, I want to clarify that I could totally not using an OpenCR to control a daisy-chained N number of dynamixel.

Currently, this is my configuration
PC --- U2D2 ---- MX-64 --- MX-64 --.... (24 * MX-64)
Based on this reference this should be totally supported. I'm only using the data pin from the U2D2 and then the power is using from another power source. My concern is about the bulk R/W performance when used in the realtime application (mine was a bipedal robot).

Another issue that I want to ask when trying to using the op3_manager code example, I experienced this problem

[ERROR] [1532100652.615660890]: Torque on DXLs! [[RxPacketError] Unknown error code!]

and your solution was

Upper Error means that you don't use OPEN-CR whose ID for communication is 200.

I'm unable to find the communication id of U2D2 anywhere on this docs

Thank you in advance

@luqmansen
Copy link

luqmansen commented Sep 29, 2020

hello @ROBOTIS-Kayman, currently I'm using this configuration

PC --- OpenCR ---- MX-64 --- MX-64 --.... (24 * MX-64)

and my problem still persists like my previous question, could you help me regarding my problem? I'm stuck for quite a while now. Thank you in advance

@ROBOTIS-Will
Copy link

Hi @luqmansen ,
I'm sorry about the late reply.

In case of OP3, the controller reads the Present Position of 20 DYNAMIXEL with 8ms control frequency at 2Mbps so you should be fine with 24 DYNAMIXEL. (refer to : https://github.com/ROBOTIS-GIT/ROBOTIS-OP3/blob/master/op3_manager/config/OP3.robot)

OP3 uses the OpenCR for IMU and power supply, therefore, using U2D2 instead of OpenCR won't need the power on sequence which causes the aforementioned error in your case.
If you are going to use the OpenCR, you should use a proper OpenCR firmware for OP3, or else, you can use U2D2 and supply power to DYNAMIXEL with a separate power line.
In the latter case using U2D2, you may be able to avoid the error by commenting out the OpenCR related code line 170~207 of op3_manager.cpp file and line 239 which adds IMU sensor on the OpenCR.

Thank you.

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

No branches or pull requests

5 participants