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

gz-sim: joint_trajectory_controller.sdf #1629

Closed
azeey-test opened this issue Aug 29, 2024 · 4 comments
Closed

gz-sim: joint_trajectory_controller.sdf #1629

azeey-test opened this issue Aug 29, 2024 · 4 comments

Comments

@azeey-test
Copy link
Collaborator

Configuration

  • os: Any

Links

Process

Step 1 - Instructions work

Step 2 - Images (if there are any) match the result

@Combuster54
Copy link

Interested

@Combuster54
Copy link

Running, I'm facing some warnings

gz  sim joint_trajectory_controller.sdf

Warnings

Warning [Utils.cc:132] [/sdf/world[@name="default"]/model[@name="RR_velocity_control"]/joint[@name="RR_velocity_control_joint1"]/dynamics:/usr/share/gz/gz-sim9/worlds/joint_trajectory_controller.sdf:L483]: XML Element[dynamics], child of element[joint], not defined in SDF. Copying[dynamics] as children of [joint].
Warning [Utils.cc:132] [/sdf/world[@name="default"]/model[@name="RR_velocity_control"]/joint[@name="RR_velocity_control_joint2"]/dynamics:/usr/share/gz/gz-sim9/worlds/joint_trajectory_controller.sdf:L494]: XML Element[dynamics], child of element[joint], not defined in SDF. Copying[dynamics] as children of [joint].

<dynamics> tags should be inside <axis>

URL: http://sdformat.org/spec?ver=1.6&elem=joint

    line 475 
      <!-- Joints -->
      <joint name="RR_velocity_control_joint1" type="revolute">
        <pose relative_to="RR_velocity_control_link0">0 0 0 0 0 0</pose>
        <parent>RR_velocity_control_link0</parent>
        <child>RR_velocity_control_link1</child>
        <axis>
          <xyz>1 0 0</xyz>
        </axis>
        <dynamics>
          <damping>0.02</damping>
        </dynamics>
      </joint>
      <joint name="RR_velocity_control_joint2" type="revolute">
        <pose relative_to="RR_velocity_control_link1">0 0 0.1 0 0 0</pose>
        <parent>RR_velocity_control_link1</parent>
        <child>RR_velocity_control_link2</child>
        <axis>
          <xyz>1 0 0</xyz>
        </axis>
        <dynamics>
          <damping>0.01</damping>
        </dynamics>
      </joint>

Solution

Reposition the dynamics tags of the joints RR_velocity_control_joint1 and RR_velocity_control_joint2 inside the axis tag.

    line 475 
      <!-- Joints -->
      <joint name="RR_velocity_control_joint1" type="revolute">
        <pose relative_to="RR_velocity_control_link0">0 0 0 0 0 0</pose>
        <parent>RR_velocity_control_link0</parent>
        <child>RR_velocity_control_link1</child>
        <axis>
          <xyz>1 0 0</xyz>
          <dynamics>
            <damping>0.01</damping>
          </dynamics>
        </axis>
      </joint>
      <joint name="RR_velocity_control_joint2" type="revolute">
        <pose relative_to="RR_velocity_control_link1">0 0 0.1 0 0 0</pose>
        <parent>RR_velocity_control_link1</parent>
        <child>RR_velocity_control_link2</child>
        <axis>
          <xyz>1 0 0</xyz>
          <dynamics>
            <damping>0.01</damping>
          </dynamics>
        </axis>
      </joint>

Testing joint trajectory commands

Position control (Red RR robot)

Screencast from 2024-08-31 08-32-35

Velocity control (Green RR robot)

Screencast from 2024-08-31 08-42-07

Effort control (Blue RR robot)

Screencast from 2024-08-31 08-48-20

@ahcorde
Copy link

ahcorde commented Sep 2, 2024

PR gazebosim/gz-sim#2580

@ahcorde
Copy link

ahcorde commented Sep 3, 2024

thank you for testing! PR is merged

@ahcorde ahcorde closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants