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

Using body_link to move center of rotation in TrackedVehicle plugin #2650

Closed
iandresolares opened this issue Oct 14, 2024 · 3 comments
Closed

Comments

@iandresolares
Copy link

iandresolares commented Oct 14, 2024

Environment

  • OS Version: Ubuntu 22.04
  • Binary build: v8.6.0 (Gazebo Sim Harmonic)

Description

Using TrackedVehicle to simulate a tracked vehicle. I would like to modify the center of rotation to be aligned to a specific point on the robot instead of the default link.
@peci1 suggested creating a link for this and setting body_link tag in the plugin configuration but it is not working for me, vehicle is still turning in respect to the base_link. This is my current configuration.

    <plugin name="gz::sim::systems::TrackedVehicle" filename="gz-sim-tracked-vehicle-system">
        <body_link><link>rotation_axis_link</link></body_link>
        <left_track><link>left_track</link></left_track>
        <right_track><link>right_track</link></right_track>
        <tracks_separation>1.375</tracks_separation>
        <tracks_height>0.5</tracks_height>
        <steering_efficiency>0.5</steering_efficiency>
        <odometry_publish_frequency>10</odometry_publish_frequency>
        <child_frame_id>rotation_axis_link</child_frame_id>
        <linear_velocity>
          <min_velocity>-2.2</min_velocity>
          <max_velocity>2.2</max_velocity>
          <min_acceleration>-1.3</min_acceleration> 
          <max_acceleration>1.3</max_acceleration>
        </linear_velocity>
        <angular_velocity>
          <min_velocity>-1.0</min_velocity>
          <max_velocity>1.0</max_velocity>
          <min_acceleration>-1.1</min_acceleration>
          <max_acceleration>1.1</max_acceleration>
        </angular_velocity>
    </plugin>
@peci1
Copy link
Contributor

peci1 commented Oct 14, 2024

That's wrong syntax. The plugin expects

        <body_link>rotation_axis_link</body_link>

If it still doesn't work, start Gazebo with gz sim -v4 to get debug output and post the output here.

@peci1
Copy link
Contributor

peci1 commented Oct 14, 2024

I've submitted PR #2652 that adds this tag to the system documentation (it was missing there for some reason).

@iandresolares
Copy link
Author

That's wrong syntax. The plugin expects

        <body_link>rotation_axis_link</body_link>

If it still doesn't work, start Gazebo with gz sim -v4 to get debug output and post the output here.

That's it, that works perfectly, thank you very much. I close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants