-
Notifications
You must be signed in to change notification settings - Fork 161
Description
Hey,
I wish to load a new robot into this framework, so to get started, I loaded unitree go1 into this framework due to the similarity with a1.
- I followed the guidelines in renaming the links and joints to be of the correct format and ensuring the fixed joints on the toe is preserved when converting to sdf.
- I have also edited the launch file load_robot_params.launch to include option for robot_type go1.
- Additionally following New Robot not loading with correct initial pos #300, I set the initial position to a sitting one.

Problem
The problem I am currently having is that when I launch the command to stand, some of the links do not respond. In fact, only the hind upper legs respond. Something like this.

Attempts
I am trying to diagnose the problem and see if it is a URDF transmission tag issue (I double checked to make sure that the tag descriptions are right). I am pretty confident that the URDF and SDF is correct, although one caveat I have is that in gazebo.xacro, I had to change the robot namespace for the plugin libgazebo_ros_control.so into something like this rather than a standard /<robot_name> for the namespace:
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/robot_1</robotNamespace>
<robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
</plugin>
. . .
</gazebo>
If not, there is no response to publishing a command for it to stand or be in READY mode.
Here is a comparison of some namespace issue I am running into with and without this fix when running quad_gazebo.launch
- With /go1 namespace
[INFO] [1660232468.756668, 0.294000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1660232468.871810502, 0.294000000]: Loading gazebo_ros_control plugin
[ INFO] [1660232468.872104836, 0.294000000]: Starting gazebo_ros_control plugin in namespace: /go1
[ INFO] [1660232468.872734191, 0.294000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_description] on the ROS param server.
. . .
[ INFO] [1660232469.001514012, 0.294000000]: Loaded gazebo_ros_control.
[ INFO] [1660232469.491466938, 0.294000000]: Ground Truth State Estimator: <updateRateHZ> set to: 500
[ WARN] [1660232469.893714005, 0.603000000]: Leg 0 motor 0: total effort = 33.700 Nm exceeds threshold of 33.500 Nm
[ WARN] [1660232469.893786922, 0.603000000]: Leg 1 motor 0: total effort = 33.617 Nm exceeds threshold of 33.500 Nm
. . .
[WARN] [1660232497.371683, 16.591000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[robot_1/controller_spawner-8] process has finished cleanly
log file: /home/andrewzheng1011/.ros/log/02c73896-198c-11ed-8ffa-0800274207d3/robot_1-controller_spawner-8*.log
- Without /robot_1 namespace
[ INFO] [1660231534.671149971, 0.091000000]: Loading gazebo_ros_control plugin
[ INFO] [1660231534.671453022, 0.091000000]: Starting gazebo_ros_control plugin in namespace: /robot_1
[ INFO] [1660231534.672041741, 0.091000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_1/robot_description] on the ROS param server.
[ INFO] [1660231534.798715538, 0.091000000]: Loaded gazebo_ros_control.
So, I am not sure if this will affect anything within the code itself, but I thought this detail was worth bringing up before I address some of the other attempts in diagnosing/fixing the problem.
For my second attempt, I see that within the code there are variables robot_ns_ and default_system in the nmpc_controller cpp code (as well as similiar identification variables of what the robot in other parts of the code). I don't believe these codes will have any affect in at least trying to get the robot to stand up using the inverse dynamics controller, but just in case I added an elseif statement in the local planner:
. . .
else if (robot_name_ == "go1") {type = A1;} // for the sake of easier integration
. . .
This sadly did not work.
So, what I wish to do now is to at least try to command each joint and at least identify if commands work for each joint (Doubting if my URDF and transmission tags are good, although visually check is good, so checking through joint commands). I am launching in this manner with joint commands:
roslaunch quad_utils quad_gazebo.launch robot_type:=go1 controller:=joint # Have tried with a1 as well
rostopic pub /robot_1/control/single_joint_command geometry_msgs/Vector3 "x: 0.0
y: 8.0
z: 20.0"
However, the robot does not move for leg index 0 (front left links), joint 8, for torque command 20. I have tried da few other joints, but no luck.
Questions
So, the question I have is how can I individually control joints in quad-sdk framework to diagnose my problem? Or is there anything in the procedure that I have done that that may cause this problem?
Sorry for the long post. Wasn't sure how to concisely word this without explaining some of the roundabout methods I use.