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

Values for low level control #11

Open
JonathanMortes opened this issue Nov 4, 2023 · 6 comments
Open

Values for low level control #11

JonathanMortes opened this issue Nov 4, 2023 · 6 comments

Comments

@JonathanMortes
Copy link

Hi,

I was wondering if you had the means of accessing the values for the PD controller. Unitree won't disclose them saying we have to find them out. I think purchasing an EDU version for research and not having the correct values to move the motors is bad more so, being as expensive as it is just to get an SDK badly documented.

Maybe you could help with this as those values are hidden somewhere in the High Level control.

Thanks

@MAVProxyUser
Copy link
Owner

This will unlikely shake out until we are able to bypass the RDP2 PCROP protection on the STM32 microcontroller they used for the motion controller.

@aatb-ch
Copy link

aatb-ch commented Nov 4, 2023

the rs-485/can lines are not encrypted no? other option is sniffing out the traffic between motion controller and motor networks, there you can decode the gains used.

@MAVProxyUser
Copy link
Owner

You could in theory do that sure. The RS485 is not encrypted.

@MAVProxyUser
Copy link
Owner

There is no documentation on their RS485 commands short of what @devemin shared.

@aatb-ch
Copy link

aatb-ch commented Nov 4, 2023

it's not officially documented no, but it should be possible to somewhat derive the message structure based on the MotorCmd struct, i see now that they comment

https://github.com/unitreerobotics/unitree_actuator_sdk/blob/0f9760ddf4ce06d3936b548aa08fb0e981a4669e/include/unitreeMotor/unitreeMotor.h#L12

Actually this should actually be what you might see on the bus..

https://github.com/unitreerobotics/unitree_actuator_sdk/blob/GO-M8010-6/include/unitreeMotor/include/motor_msg.h

typedef struct
{
    uint8_t head[2];    // 包头         2Byte
    RIS_Mode_t mode;    // 电机控制模式  1Byte
    RIS_Comd_t comd;    // 电机期望数据 12Byte
    uint16_t   CRC16;   // CRC          2Byte

} ControlData_t;    // 主机控制命令     17Byte

@MAVProxyUser
Copy link
Owner

Also here in a different notation https://github.com/Bin4ry/free-dog-sdk/blob/main/ucl/complex.py#L66

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

3 participants