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

对于真正的机器人,在何处添加"send_orders"和"receive_commands"方法? #8

Open
elpimous opened this issue Aug 24, 2021 · 7 comments

Comments

@elpimous
Copy link

嗨,德里克,
你的西穆包很有魅力。
现在我想把它加入我真正的机器人。
你能告诉我在哪里添加我的c++方法吗?

一个用于发送订单(id、pos、vel、扭矩、kp、kd)
一个用于查询(id、pos、vel、扭矩、kp、kd)

在mainController.cpp中?不知道在哪里!!
对于12 ID,它应该存在于

迫不及待地想念你。
非常感谢
Vincent (french)

@elpimous
Copy link
Author

elpimous commented Aug 24, 2021

在LegController.cpp下,我看到了LegController:: update Data (LegDatalegData,添加我查询方法的位置)是否正确?
and here, L126: void LegCommand T: update Command (LegCommand
legCommand, Vec4T>&crtlParam)。
the place to send my motors orders?
非常感谢
vincent

@Derek-TH-Wang
Copy link
Owner

可以写一个main.cpp,里面调用SetIMUData和SetLegData函数,将IMU和电机数据放入控制器,然后写一个获取规划关节位置速度的函数,并调用ToqueCalculateor函数计算关节力矩,将这个力矩及设定的kp,kd,以及关节规划位置速度一起下发到电机.
流程上与仿真py文件主循环相似,可供参考.

@Derek-TH-Wang
Copy link
Owner

LegDatalegData是将电机实际的反馈值赋值进去
LegCommand 是计算出来的规划值,需要下发给电机

@elpimous
Copy link
Author

Thanks Derek... Trying.

@elpimous
Copy link
Author

Hello Derek..
I made a main.cpp who send and receive ID, pos, vel, torque, kp, kd.
Is it enough?

It sends too IMU values.

I send it to SetIMUData and SetLegData functions,
Correct?

Do you have an code example of what extra lines of code I need?

Thanks a lot Derek.
Vincent

@elpimous
Copy link
Author

elpimous commented Dec 9, 2021

Hey, Derek.. Would you help me in my previous post?
Have a nice day
Vincent

@Derek-TH-Wang
Copy link
Owner

Derek-TH-Wang commented Dec 13, 2021 via email

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

2 participants