Derek-TH-Wang / quadruped_ctrl

MIT mini cheetah quadruped robot simulated in pybullet environment using ros.
MIT License
313 stars 74 forks source link

trying on real robot, with walking_simulation.py #13

Closed elpimous closed 2 years ago

elpimous commented 2 years ago

Hello Derek, before going any further, with a c++ difficult code, I'd like to use your python file, to command my motors. (before doing same in c++) Could you tell me what function i have to call, to sends to real robot motor boards, and what fonction to call, to receive motor values?

Am I right ? : inside the fonction : self.__get_data_from_sim()

inside the fonction : self.__get_motor_joint_states()

and inside : tau = self.cpp_gait_ctrller.torque_calculator(self.__convert_type( imu_data), self.__convert_type(leg_data["state"]))

Derek-TH-Wang commented 2 years ago

yes, you're right

elpimous commented 2 years ago

Super @Derek-TH-Wang. So I have force to send to motors And could you tell me where to pick values Position/velocity in the code, to send to real motors?!

Derek-TH-Wang commented 2 years ago

you can use 'legcommand' to send to the real robot. 'legcommand' struct is in legController file.