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

[JTC] Add Parameter to Toggle State Setting on Activation #1231

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,9 @@ controller_interface::CallbackReturn JointTrajectoryController::on_activate(
// running already)
trajectory_msgs::msg::JointTrajectoryPoint state;
resize_joint_trajectory_point(state, dof_);
if (read_state_from_command_interfaces(state))
if (
params_.set_last_command_interface_value_as_state_on_activation &&
read_state_from_command_interfaces(state))
{
state_current_ = state;
last_commanded_state_ = state;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ joint_trajectory_controller:
default_value: false,
description: "Allow integration in goal trajectories to accept goals without position or velocity specified",
}
set_last_command_interface_value_as_state_on_activation: {
type: bool,
default_value: true,
description: "If enabled, set the last command interface value as both the current state and the last commanded state upon activation.",
}
action_monitor_rate: {
type: double,
default_value: 20.0,
Expand Down
Loading