[Reference Only/Draft] joint_trajectory_controller convert trajectories to effort values#36
[Reference Only/Draft] joint_trajectory_controller convert trajectories to effort values#36ddengster wants to merge 6 commits intoros-controls:masterfrom ddengster:effort_convert
Conversation
| } | ||
| } | ||
|
|
||
| double period = lifecycle_node_->get_parameter("period").as_double(); |
There was a problem hiding this comment.
This hack is supplied upstream from gazebo_ros_controls; ideally we should use something else.
| double p = lifecycle_node_->get_parameter("gains." + joint_names_[j] + ".p").get_value<double>(); | ||
| double d = lifecycle_node_->get_parameter("gains." + joint_names_[j] + ".d").get_value<double>(); | ||
| double i = lifecycle_node_->get_parameter("gains." + joint_names_[j] + ".i").get_value<double>(); | ||
| double iclamp = lifecycle_node_->get_parameter("gains." + joint_names_[j] + ".i_clamp").get_value<double>(); |
There was a problem hiding this comment.
pid parameters are retrieved from the node.
| f = pids_[index]->computeCommand(state_error.positions[index], state_error.velocities[index], rclcpp::Duration::from_seconds(period)); | ||
|
|
||
| const double command = (state_desired.velocities[index] * velocity_ff_[index]) + f; | ||
| registered_joint_cmd_handles_[index]->set_cmd(command); |
There was a problem hiding this comment.
It took a significant amount of effort tracing down effort_controllers::JointTrajectoryController. But it boiled down to this code. I use control_toolbox::pid to convert the errors to effort values.
|
This PR can now be rebased (I've squashed the jtc PR, here you can do an interactive rebase and drop everything up to |
Add ros2_control metapackage
|
Hi, what is the status of this pull request? I'm looking for a ROS2 replacement for |
|
Because of API change, this is obsolete. It should be replaced by #140 |
Used in conjunction with ros-simulation/gazebo_ros_pkgs#1083
The code changes in this PR was intended to work with a 'coffeebot' simulation in gazebo. It has lots of hacks, and is only meant to be an incomplete guide to porting to ROS2.
Things of note will be put in reviews.
Update: Also used with moveit2 training moveit/moveit2#187 with change 9a493a5