Joint to cartesian controller#224
Open
InigoMoreno wants to merge 5 commits intofzi-forschungszentrum-informatik:ros2from
Open
Joint to cartesian controller#224InigoMoreno wants to merge 5 commits intofzi-forschungszentrum-informatik:ros2from
InigoMoreno wants to merge 5 commits intofzi-forschungszentrum-informatik:ros2from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #223 Working joint to cartesian controller.
I decided to go with the new controller chaining instead of the previous way of instantiating a controller manager from a controller. Basically the new joint_to_cartesian_controller creates new state and command interfaces "joint_to_cartesian_controller/jointx" from the interfaces of "jointx". A joint trajectory controller can then control these fake interfaces and instead of moving the robot, they move the target frame.
If you want to test this, you can't use "rqt_joint_trajectory_controller", as that plugin assumes the joints controlled are the ones in the urdf, but that's not the case here, so I wrote a small script to test it. To test everyhting, just turn on the joint_cartesian_trajectory_controller, run the script changing the trajectory point and watch the target move. You can also activate the cartesian_motion_control to make the robot follow the target.
Before merging, please be aware that this depends on chaining state interfaces, something that was introduced in ros-controls/ros2_control#1021 and is only available on the jazzy binaries of ros2_control. You can make it work in humble by compiling ros2_control from source. Maybe this should be merged onto a new jazzy branch. I also haven't updated the README, and the copyright header now mentions PAL Robotics as I started from the passthrough controller on ros2_control_demos/example_12.
Here is the script I used for testing: