-
Notifications
You must be signed in to change notification settings - Fork 324
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
[Reference Only/Draft] joint_trajectory_controller convert trajectories to effort values #36
Conversation
} | ||
} | ||
|
||
double period = lifecycle_node_->get_parameter("period").as_double(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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