skywoodsz / qm_control

Quadruped manipulator controller using model predictive control and whole body control based on OCS2
228 stars 36 forks source link

Questions on how to edit the controller for grasping #12

Closed danisotelo closed 4 months ago

danisotelo commented 5 months ago

Hello, thank you for open sourcing this great project!

I am using it as a base for achieving the quadruped manipulator to carry out complex tasks such as opening doors. I have successfully modified the controller to use the Z1 Unitree arm (with 6 dof and the gripper). I would like to control the gripper joint in Gazebo (for opening and closing it for example to grasp the door handle) with a service whenever I want but I have not been able to create a controller compatible with the custom one, and in Rviz the TF corresponding to the movable part of the gripper is not being published since I have not included it as a joint of the WBC. I was wondering how you managed to solve this problem and if you know any way to achieve this. Thank you very much for your time!

skywoodsz commented 5 months ago

Hello, thank you for open sourcing this great project!

I am using it as a base for achieving the quadruped manipulator to carry out complex tasks such as opening doors. I have successfully modified the controller to use the Z1 Unitree arm (with 6 dof and the gripper). I would like to control the gripper joint in Gazebo (for opening and closing it for example to grasp the door handle) with a service whenever I want but I have not been able to create a controller compatible with the custom one, and in Rviz the TF corresponding to the movable part of the gripper is not being published since I have not included it as a joint of the WBC. I was wondering how you managed to solve this problem and if you know any way to achieve this. Thank you very much for your time!

@danisotelo Thanks for following up! I do not suggest considering gripper joints in the MPC and WBC, as this would increase solve time. Instead, I suggest using the following method to control the gripper.

  1. Refer to MPC Only, you can use effort_controllers/JointPositionController to control your gripper independently. The dvantage of this is that you don't need to modify qm_controller.
  2. Or you can modify qm_gazebo/src/QMHWSim.cpp by joining gripper joints in QMHWSim::readSim and QMHWSim::writeSim. Meanwhile, design your gripper controller in QMController::update.
  3. For the TF, I suggest you add another node to publish gripper joint states and static transform from ee link to gripper.

Good luck. If you have other questions, please let me know.

danisotelo commented 5 months ago

Thank you so much for your fast response! I will try with that 😁

OceansDepp commented 3 months ago

Hello, thank you for open sourcing this great project!

I am using it as a base for achieving the quadruped manipulator to carry out complex tasks such as opening doors. I have successfully modified the controller to use the Z1 Unitree arm (with 6 dof and the gripper). I would like to control the gripper joint in Gazebo (for opening and closing it for example to grasp the door handle) with a service whenever I want but I have not been able to create a controller compatible with the custom one, and in Rviz the TF corresponding to the movable part of the gripper is not being published since I have not included it as a joint of the WBC. I was wondering how you managed to solve this problem and if you know any way to achieve this. Thank you very much for your time!

Hi! I am also trying to modify the arm to unitree z1 but met some technical issues. Could you please share what changes did you make to change the manipulator? Thank you very much for your help!