-
Notifications
You must be signed in to change notification settings - Fork 227
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
Forward trajectory controller #944
Conversation
I cannot reproduce your build errors, are you up-to-date with the packages listed in As for the general idea, i don't think the forwarding controller should be derived from the JTC at all as it doesn't do any spline interpolation itself. You can just derive directly from The main problem we will have is encoding the trajectory in a way that it reaches the hardware interface. In ROS 1, we could just define |
I am up-to-date on everything, as far as i can tell, but I have started working while deriving from ControllerInterface and that works fine, so i will just continue on that. |
The controller is now functional, and you should be able to test it out yourself. A user can give the controller a trajectory to forward via the action server running on the controller. It is possible to define trajectories with just positions, or with both positions and velocities and/or accelerations. The trajectory is transferred to the hardware interface via the command interfaces, before the hardware interface then transfers it to the robot. |
c7eea3c
to
983bc62
Compare
20fe4a6
to
a8b83ff
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.
This is looking very promising but I think we have to iterate this a couple of times, since this is a rather big change :-)
ur_controllers/include/ur_controllers/passthrough_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
ur_controllers/include/ur_controllers/passthrough_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
a8b83ff
to
8e8f88f
Compare
Creates errors on compilation due to multiple definition of funtions.
…upports passing through accelerations and velocities.
The number of joints in the controller is variable and received from the hardware interface. (It is not variable there though). The internal action server uses the action type FollowJointTrajectory. Both goal time tolerance and goal position tolerance are checked upon completion of trajectory, and feedback is sent to the user. The integration test has also been updated to test the controller.
Did some cleanup of comments and print statements. Improved the examples, so they are easier to use.
Moved functionality of passthrough controller from separate execute loop in to controller's update method. Also changed how the controller checks validity of a received trajectory, and how it communicates that to the hardware interface.
8e8f88f
to
4c9d9b6
Compare
Command and state interfaces are now only interacted with within the update method. The update method still triggers some action server callbacks, so it is not threadsafe yet, but i dont know how to trigger the action server without having them in the update method.
ur_controllers/include/ur_controllers/passthrough_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
This should making it drop in easier
This gets started by the initial joint_controller
If we want to use other types for forwarding such as Cartesian setpoints or motion primitives it doesn't really make sense to have this as a part of the joints.
This reverts commit e224dfa.
This should be thread-safe in contrast to calling it from the AsyncIO thread.
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.
Works nicely and looks good, I just have some minor suggestions.
ur_controllers/include/ur_controllers/passthrough_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Vincenzo Di Pentima <[email protected]>
This reverts commit bc76a61.
This makes sure that it is not possible to activate more than one writing controller at the same time (independent whether on tries to start them together or one of them is already running) I've also added a test for that to ensure that what we want is actually achieved.
3f0767d
to
4b033c0
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.
Approving so my previous change request gets reset.
This adds a controller that allows sending a complete trajectory to the robot for execution. --------- Co-authored-by: Felix Exner <[email protected]> (cherry picked from commit ca5fb3e) # Conflicts: # ur_robot_driver/config/ur_controllers.yaml # ur_robot_driver/launch/ur_control.launch.py # ur_robot_driver/scripts/example_move.py # ur_robot_driver/urdf/ur.ros2_control.xacro
This adds a controller that allows sending a complete trajectory to the robot for execution. --------- Co-authored-by: Felix Exner <[email protected]> (cherry picked from commit ca5fb3e) # Conflicts: # ur_robot_driver/launch/ur_control.launch.py # ur_robot_driver/scripts/example_move.py # ur_robot_driver/urdf/ur.ros2_control.xacro
The controller should be able to forward a cartesian tracjectory to the robot for interpolation.
Creates errors on compilation due to multiple definition of functions, when inheriting from the joint_trajectory_controller. But looking at the passthrough controllers from ROS1 that may not be the right controller to use anyway?
All inputs are welcome.
closes #839