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

fix parameter namespacing for gripper controller #3023

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Changes from 3 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 @@ -156,7 +156,7 @@ class MoveItSimpleControllerManager : public moveit_controller_manager::MoveItCo

new_handle = std::make_shared<GripperControllerHandle>(node_, controller_name, action_ns, max_effort);
bool parallel_gripper = false;
if (node_->get_parameter(makeParameterName(PARAM_BASE_NAME, "parallel"), parallel_gripper) && parallel_gripper)
if (node_->get_parameter(makeParameterName(PARAM_BASE_NAME, controller_name, "parallel"), parallel_gripper) && parallel_gripper)
{
if (controller_joints.size() != 2)
{
Expand All @@ -170,14 +170,14 @@ class MoveItSimpleControllerManager : public moveit_controller_manager::MoveItCo
else
{
std::string command_joint;
if (!node_->get_parameter(makeParameterName(PARAM_BASE_NAME, "command_joint"), command_joint))
if (!node_->get_parameter(makeParameterName(PARAM_BASE_NAME, controller_name, "command_joint"), command_joint))
command_joint = controller_joints[0];

static_cast<GripperControllerHandle*>(new_handle.get())->setCommandJoint(command_joint);
}

bool allow_failure;
node_->get_parameter_or(makeParameterName(PARAM_BASE_NAME, "allow_failure"), allow_failure, false);
node_->get_parameter_or(makeParameterName(PARAM_BASE_NAME, controller_name, "allow_failure"), allow_failure, false);
static_cast<GripperControllerHandle*>(new_handle.get())->allowFailure(allow_failure);

RCLCPP_INFO_STREAM(getLogger(), "Added GripperCommand controller for " << controller_name);
Expand Down
Loading