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

Can't update urdf/sdf files for A1 robot without breaking simulation #426

Open
DanielChaseButterfield opened this issue Jun 26, 2024 · 0 comments

Comments

@DanielChaseButterfield
Copy link

Hi, my issue is quite similar to issue #340. Basically, I wanted to add a camera to the A1 robot already supported in Quad-SDK, following the instructions at Adding a New Type of Robot to Quad-SDK to regenerate the urdf/sdf files, and following the instructions at Tutorial: Using Gazebo plugins with ROS to edit the xacro files to add a camera.

However, I'm running into issues multiple issues after running the rosrun xacro xacro and gz sdf commands:

  • The final .sdf file is missing the toe links (<link name='toe0'>, etc). The .urdf file still has these links, so it's weird that they're removed. I've found that there can be issues with links being removed if they don't have a large enough mass or an inertia property gazebosim/sdformat/issues/199, but the toe links have a decent sized mass and an inertia matrix specified. How can I get the toe links back?
  • The sdf file has an extra line included for the gazebo ros plugin:
 <plugin name='gazebo_ros_force' filename='libgazebo_ros_force.so'>
      <topicName>/apply_force/trunk</topicName>
      <bodyName>body</bodyName>
      <xyzOffset>0 0 0</xyzOffset>
      <rpyOffset>0 -0 0</rpyOffset>
      <ignition::corrected_offsets>1</ignition::corrected_offsets>
    </plugin>

The line that causes issues is <ignition::corrected_offsets>1</ignition::corrected_offsets>. I've been able to manually remove it, but I feel like manually editing the sdf file can be a problem for development down the line.

  • Even after correcting for the issue in the bullet point above, running the simulator fails to spawn the A1 robot model, even though the terminal has no explicit error message. However, the following node does die, just without a specific error:
[gazebo-2] process has died [pid 15636, exit code 255, cmd /opt/ros/noetic/lib/gazebo_ros/gzserver -e ode /home/lunarlab/Desktop/quadruped_sim_ws/src/quad-sdk/quad_simulator/gazebo_scripts/worlds/flat/flat.world __name:=gazebo __log:=/home/lunarlab/.ros/log/af49da22-3403-11ef-98ad-c7c55710e0aa/gazebo-2.log].
log file: /home/lunarlab/.ros/log/af49da22-3403-11ef-98ad-c7c55710e0aa/gazebo-2*.log

Sometimes, the following node also dies, but not always. This is in `quad_spawn.launch1:

 <node name="spawn_sdf_model" pkg="gazebo_ros" type="spawn_model" args="-sdf -param robot_description_sdf -model $(arg namespace) $(arg init_pose)" output="screen"/>

Basically, the simulator just ends up with a white block for a robot, which stops all simulation. Do ya'll know what I could possible do to avoid these issues? As I mentioned in Issue #340, I tried generating an sdf with a version of 1.6 instead of 1.7 (as that was the previous version in this repo), but the tool failed saying that it was missing a root.sdf file.

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

1 participant