danisotelo / qm_door

:dog2: Quadruped manipulator planner and controller using MPC and WBC based on OCS2: Unitree AlienGo + Z1
https://danisotelo.netlify.app/projects/nonlinear%20mpc%20for%20quadruped%20manipulator/
BSD 3-Clause "New" or "Revised" License
35 stars 4 forks source link

A few minor issues while running the program #3

Closed LianzhaoZhang closed 1 month ago

LianzhaoZhang commented 2 months ago

Hi @danisotelo , your work is excellent, and thank you for sharing the project!

I am currently on the main branch at commit 009a37d and have encountered a few minor issues while running the program.

  1. I followed these steps to start the simulation: First, I launched empty_world.launch, then load_controller.launch. After that, I started joint_state_controller and qm_controller using rqt_controller_manager. However, when running roslaunch qm_controllers load_qm_target.launch, the terminal displayed the following error:

    ERROR: cannot launch node of type [qm_controllers/gait_command_simulator]: Cannot locate node of type [gait_command_simulator] in package [qm_controllers]. Make sure file exists in package path and permission is set to executable (chmod +x)

    In the load_qm_target.launch file, I found that the gait_command_simulator node is launched using:

    <node name="gait_command_simulator" pkg="qm_controllers" type="gait_command_simulator" output="screen"/>

    However, I couldn't find this node in the CMakeLists.txt file. Despite the error message in the terminal, this minor bug doesn't prevent the program from continuing to run.

  2. After running roslaunch qm_controllers load_qm_target.launch, the robot is displayed in RViz. However, in the RViz Displays window, under RobotModel--Status: Error--gripperMover, it shows No transform from [gripperMover] to [world]. I thoroughly examined the xacro and urdf files and believe there are no issues with the robot description files. I then ran rosrun rqt_tf_tree rqt_tf_tree to visualize the TF tree and found that the gripperMover link is not present. I tested this issue on another computer as well and encountered the same problem. Have you experienced this issue? Display in Rviz Display in Gazebo

  3. Following the steps in the README file to start the simulation, I proceeded as follows: 1) roslaunch qm_gazebo empty_world.launch to launch Gazebo; 2) mon launch qm_controllers load_controller.launch to load the controllers; 3) rosrun rqt_controller_manager rqt_controller_manager to start joint_state_controller and qm_controller; 4) roslaunch qm_controllers load_qm_target.launch to initiate the desired trajectory publishing; 5) rostopic pub /gait_command_topic std_msgs/String "trot" to publish the robot's gait.

    During step 4, when I right-click the Interactive Marker to publish the desired end-effector pose for the robotic arm, the quadruped robot stands up. However, when I move the Interactive Marker and publish a new desired end-effector pose, the movement of the robotic arm doesn't seem smooth or natural, as shown in the video. I'm unsure if this is due to an issue with my startup process or something else. `

https://github.com/user-attachments/assets/f7354595-fbd4-48b0-bd6d-bdc118135e8b

LianzhaoZhang commented 2 months ago

Of the two images I previously submitted, the first one with the red circle shows the robot displayed in RViz, while the second one shows the robot as it appears in Gazebo.

The uploaded image below shows the visualization of the TF tree after I ran rosrun rqt_tf_tree rqt_tf_tree.

frames

danisotelo commented 1 month ago

Hi @LianzhaoZhang! Thanks for reporting these issues.

  1. With respect to the first bug, I will correct the CMakeLists.txt file.

  2. With respect to the second one, it is related to the fact I did not have time to implement the Gripper Controller together with the NMPC controller, and since no controller is used for the gripper the TF is not published and thus, the gripper is not represented in RViz. If this problem disturbs you, what I did was to simply set the joint as fixed in the URDF file. If you want to use the Gripper you will find this issue does not occur in case you select to use the separate controllers setup (for which you have a NMPC controller for the quadruped and individual PD controllers for each of the arm joints, including the gripper). If you want to have the whole-body NMPC controller including the gripper you should modify the NMPC controller files. When I tried to do it I got errors because of trying to access Gazebo information while the NMPC controller was already doing that. You will be able to solve it as explained in https://github.com/qiayuanl/legged_control/pull/71, I plan to do it in future work.

  3. Finally, with respect to the strange behavior you obtain, you might be able to correct it by modifying the parameters of Q and R NMPC controller matrices, as well as the Kp and Kd values of the Whole-Body Controller. I am not sure why you obtain this behavior with the same weights I have, since I did not observe these problems in my machine.

LianzhaoZhang commented 1 month ago

Thank you so much for your detailed response. Your answer was incredibly helpful, and I really appreciate the time you took to explain everything.