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

No status packet error #106

Closed
FlorianRuen opened this issue Aug 16, 2017 · 18 comments
Closed

No status packet error #106

FlorianRuen opened this issue Aug 16, 2017 · 18 comments
Assignees
Labels

Comments

@FlorianRuen
Copy link

FlorianRuen commented Aug 16, 2017

Hi everyone,

I'm using the dynamixel SDK on a raspberry pi 3 with Raspbian (latest available version), I follow all the instruction on the wiki (for the C library on linux)

To run on raspberry pi, I changed the port name from /dev/tty/USB0 to /dev/tty/ACM0, i changed my motor ID from 1 to 12.

But when I run the ./read_write, there is a error message like this screenshoot
https://img15.hostingpics.net/pics/48732469xx.png

I can't find the problem, the baudrate is OK, the motor ID is OK and the port is OK. Have an idea ?

Thanks a lot and have a good day

Best regards, Florian.

@FlorianRuen FlorianRuen changed the title Unable to open the serial port No status packet error Aug 16, 2017
@FlorianRuen
Copy link
Author

I tried many baudrate (like 1000000 or 9600) and i tried to add some delays (in case if the the communication can't manage the speed of the loop ...)

But no changes, still the same message ...

@LeonJung
Copy link
Contributor

LeonJung commented Aug 18, 2017

@FlorianRuen

Hi,

I need more details for the solve.
Devices you are using, which version of SDK you have downloaded, some views that can describe hardware connections.

What you attached here shows that the port are succeeded to be opened, but the Dynamixel couldn't respond to what you sent for some reason.

Can I guess that you have plugged the device into the GPIO port? or some external device? such as embedded platform or something?

@FlorianRuen
Copy link
Author

Hi,

I am using a raspberry pi 3 with the latest version of raspbian, and dynamixel XL320.

For the hardware I am using a USB2AX connected on usb port of the raspberry (/dev/ttyACM0)
this usb2ax is plug on a hub to connect some dynamixel (like this https://www.generationrobots.com/en/400989-dynamixel-3pins-hub.html), but actually only one is connected.

The version of the dynamixel sdk is the latest on github, 3.4.7

When I am using the roboplus software, my dynamixel is ok and ready to receive some actions with the same connection between us.

Thanks for your help and have a good day !

@LeonJung
Copy link
Contributor

@FlorianRuen

Hi,

unfortunately, we can't help you now with the device you have, as mentioned in the Issue bulletin rules

It should work, however, because there were many peoples who said about USB2AX and it worked.

but I know that many users are using USB2AX, so I'm thinking about testing with USB2AX here.

See other forks that tried with USB2AX or please wait until the test is done, but it will take much time.

@FlorianRuen
Copy link
Author

And directly with the GPIO do you think it can work ?

@LeonJung
Copy link
Contributor

@FlorianRuen

Nope, you need a board that changes uart signal into ttl or rs485 signal, and rpi basically transmits signal via gpio at 115200 baudrate, and no more.
actually you can follow some walkthrough to set its baudrate to over than 1M, but it is not stable in my experience

@FlorianRuen
Copy link
Author

Ok, I have a PIXL module from Roboticia i will try using this and I give you my feedback soon !

@FlorianRuen
Copy link
Author

FlorianRuen commented Aug 18, 2017

I found on the Xevelabs website, a little tutoriel to use the Dynamixel SDK with USB2AX (the file dxl_hal.c has modified)

But on the Dynamixel SDK source, I'm not able to find the dxl_hal.c file in the latest version (but in version 1.01 the file is present)

The link to the tutorial is the following: http://www.xevelabs.com/doku.php?id=product:usb2ax:faq#qdynamixel_sdkhow_do_i_use_it_with_the_usb2ax

@LeonJung
Copy link
Contributor

LeonJung commented Aug 19, 2017

@FlorianRuen

Dynamixel SDK which includes dxl_hal are old ones, and are not supported now.
We only will deal with 3.x version.

btw, I've noticed that where you linked shows some minor change in packet receive wait time which means timeout setting. You can see it in paragraph here:

Gotchas with the Dynamixel SDK for Linux:

...
If you have frequent timeout errors, you might try to change l.154 of dxl_hal.c from gfRcvWaitTime = (float)(gfByteTransTime*(float)NumRcvByte + 5.0f); to gfRcvWaitTime = (float)(gfByteTransTime*(float)NumRcvByte + 34.0f);
...

So, I guess it may work if you change LATENCY_TIMER in the source Line 46 to more that 8 msec.

Lets try like 30 or somethiing and give me feedback.

@FlorianRuen
Copy link
Author

FlorianRuen commented Aug 19, 2017

The problem is very ladle ...

I change the LATENCY_TIMER like you said, the error message is the same, but i tried to use the dxl_monitor to scan all the dynamixel status, my motor is found.

But when i want to read present position, the error message is the same but different using each protocol (1.0 and 2.0).

What I do not understand is that it happens to find it (so by receiving a ping) but it can do nothing else ...

See the folowing screenshot: https://img4.hostingpics.net/pics/825616xxx.png

PS: I can reboot the motor with protocol 2.0, I have the hardware error message but after the message "Success to reboot" and the red led of my motor blinked

@FlorianRuen
Copy link
Author

FlorianRuen commented Aug 19, 2017

Update 2: After an update of my USB2AX firmware, the commands run on the real motor (the motor move, the led color change) and I can read some data from it (like present position, current led color ...)

Last problem to solve: I have always the error message: "[RxPacketError] Hardware error occured. Check the error at Control Table ..."

Thanks for your help

@LeonJung
Copy link
Contributor

@FlorianRuen

You did great,

Thanks for a good reference

while running with roboplus manager, didnt you find any hardware alarm that will be shown in address 50?

@FlorianRuen
Copy link
Author

No error with RoboPlus after doing the same actions.

@LeonJung
Copy link
Contributor

@FlorianRuen

  1. If it occurs Hardware error, it will show non-zero value in Hardware Error Status @ ADDR 50.
    1.1 If it is non-zero, it will show same value of what is also shown @ ADDR 18 Alarm Shutdown.
    1.2 See http://support.robotis.com/en/Product InformationActuatorDynamixel XXL SeriesXL320 → Control Table
    1.3 XL320 will alarm when (1) input voltage is insufficient, (2) high temperature, (3) overload

If you think it is weird,
but if you could get read data,
remove the debug code of hardware error, and show me the error value in integer

@FlorianRuen
Copy link
Author

FlorianRuen commented Aug 22, 2017

I will give you an answer tonight, but I think that the value in ADDR 50 = 0 at this time

@FlorianRuen
Copy link
Author

Hi,

Sorry for the answer time, but I was very busy the last days.

I corrected the "Hardware error" problem, I think it's due to a bad contact in my USB2AX (or something like this)

Now, the script is correctly working with the USB2AX on Raspberry PI 3. Thanks a lot !

@LeonJung
Copy link
Contributor

@FlorianRuen

Great work,

I should be ready for whom uses USB2AX someday

keep in touch

@LeonJung LeonJung mentioned this issue Aug 27, 2017
7 tasks
@LeonJung LeonJung self-assigned this Aug 27, 2017
@yoggi56
Copy link

yoggi56 commented Aug 25, 2019

Hi!
I have the same issue but with AX-12+ servo. Unfortenatelly firmware updating of USB2AX and changing the value of LATENCY_TIMER don't fix this problem.

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

3 participants