Robotics StackExchange | Archived questions

ROS2 humble JointTrajectoryPoint.msg documentation: what does this notation mean?

I am making a gazebo RL environment, and ros2_control and gazebo_ros2_control have issues when I reset my simulation after an episode which would make the RL model. I am trying to make a joint command publisher that moves joints with "effort", and I see this documentation: https://github.com/ros2/common_interfaces/blob/humble/trajectory_msgs/msg/JointTrajectoryPoint.msg

Each trajectory point specifies either positions[, velocities[, accelerations]] or positions[, effort] for the trajectory to be executed. All specified values are in the same order as the joint names in JointTrajectory.msg.

what does positions[, effort] mean? do I have to send a message about the "position" aswell? How do I use this message to just publish some effort values without worrying about position?

Asked by aihoque2 on 2023-03-29 00:59:56 UTC

Comments

Answers

You probably want an effort_controllers/JointGroupEffortController here if you want to command joint efforts directly without specifying position targets.

See here for more:

https://answers.ros.org/question/368275/why-effort_controllersjointtrajectorycontroller-is-asking-for-pid-gains-in-gazebo/

I believe joint trajectory controllers always try to hit a sequence of joint positions, and the effort_controllers version does so by sending effort commands based on the position errors.

I guess that you can also request that it attempt to correct the effort error as well, so you can hit target efforts at the same time you hit your target positions.

The bracket notation is telling you what you can optionally specify. You don't need to provide a target effort, but you may if you wish and I think in principle it will try to hit both.

I'd have to dig into code to understand how it works but I don't think you want the joint trajectory controller anyway.

Asked by danzimmerman on 2023-04-01 00:09:56 UTC

Comments

I tried to use ros2_control and gazebo_ros2_control but restarting the control manager is difficult because calling the controller_manager/switch_controller after I call /reset_sim to reset a gazebo simulation.

Asked by aihoque2 on 2023-04-02 16:10:44 UTC