-
Notifications
You must be signed in to change notification settings - Fork 532
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
Port moveit_simple_controller_manager #158
Conversation
moveit_core/controller_manager/include/moveit/controller_manager/controller_manager.h
Show resolved
Hide resolved
b597b63
to
38ce16f
Compare
moveit_plugins/moveit_simple_controller_manager/src/moveit_simple_controller_manager.cpp
Show resolved
Hide resolved
6140d6f
to
ddde33d
Compare
d6676a8
to
b6f32ae
Compare
This PR assumes /**:
ros__parameters:
controller_names:
- position_joint_trajectory_controller
- fake_panda_arm_controller
- fake_hand_controller
- franka_gripper
fake_panda_arm_controller:
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
fake_hand_controller:
joints:
- panda_finger_joint1
- panda_finger_joint2
position_joint_trajectory_controller:
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
franka_gripper:
action_ns: gripper_action
type: GripperCommand
default: true
joints:
- panda_finger_joint1
- panda_finger_joint2
|
b6f32ae
to
ee45a8c
Compare
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Show resolved
Hide resolved
...t_plugins/moveit_simple_controller_manager/src/follow_joint_trajectory_controller_handle.cpp
Show resolved
Hide resolved
...t_plugins/moveit_simple_controller_manager/src/follow_joint_trajectory_controller_handle.cpp
Show resolved
Hide resolved
8254269
to
257cbe5
Compare
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
{ | ||
if (!isStruct(controller_list[i], { "name", "joints", "action_ns", "type" })) | ||
std::map<std::string, rclcpp::Parameter> controller_params; | ||
node_->get_parameters(controller_name, controller_params); |
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.
Or node_->get_node_parameters_interface()->get_parameters_by_prefix(controller_name, controller_params);
.?
node_->get_parameters
is supposed to be called with map of strings to a type (bool, int, string, ..etc) but it works with having rclcpp::Parameter
not sure if it's hacky
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.
I think it's supposed to work like that
9f1d1eb
to
a6d4028
Compare
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.
Migration steps look good. We will have to test and probably revise parameter lookup (did you test this), but I agree with the general approach with the additional controller names. Please address the comments, then +1
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Show resolved
Hide resolved
...controller_manager/include/moveit_simple_controller_manager/action_based_controller_handle.h
Outdated
Show resolved
Hide resolved
...mple_controller_manager/include/moveit_simple_controller_manager/gripper_controller_handle.h
Show resolved
Hide resolved
...t_plugins/moveit_simple_controller_manager/src/follow_joint_trajectory_controller_handle.cpp
Show resolved
Hide resolved
...t_plugins/moveit_simple_controller_manager/src/follow_joint_trajectory_controller_handle.cpp
Show resolved
Hide resolved
...t_plugins/moveit_simple_controller_manager/src/follow_joint_trajectory_controller_handle.cpp
Show resolved
Hide resolved
moveit_plugins/moveit_simple_controller_manager/src/moveit_simple_controller_manager.cpp
Show resolved
Hide resolved
d5fba09
to
06ce37a
Compare
@@ -51,7 +51,8 @@ namespace moveit_simple_controller_manager | |||
class ActionBasedControllerHandleBase : public moveit_controller_manager::MoveItControllerHandle | |||
{ | |||
public: | |||
ActionBasedControllerHandleBase(const std::string& name) : moveit_controller_manager::MoveItControllerHandle(name) | |||
ActionBasedControllerHandleBase(const std::string& name, const std::string& logger_name) | |||
: moveit_controller_manager::MoveItControllerHandle(name), LOGGER(rclcpp::get_logger(logger_name)) |
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.
The default constructor is implicitly deleted the only public constructor is the copy constructor, the constructor with string is private with get_logger as a friend to the class
@henningkayser I didn't squash the last commit for you to be able to review it alone, is this how you want me to handle the logger in header file .? |
3d0a6f5
to
adca74c
Compare
Description
Please explain the changes you made, including a reference to the related issue if applicable
Checklist