trac_ik
trac_ik copied to clipboard
Add ROS 2 support
This is a meta-ticket that I'll use to track progress for multiple smaller items. Notably:
-
trac_ik_lib
: (#2)- [x] Migrate parameters business to be
rclcpp
compliant.- [x] ⚠️API break⚠️: As a fallout of this directive, I've changed a
TracIK
constructor to accept astd::string
of the URDF XML robot description file, rather than astd::string
of the parameter housing the robot description XML. This was necessary because parameters are not global in ROS 2, and because I didn't want to publish the XML on arobot_description
topic (although that's how it's done inrobot_state_publisher
).
- [x] ⚠️API break⚠️: As a fallout of this directive, I've changed a
- [x] Convert
roscpp
logging macros torclcpp
logging macros. - [x] Move from
boost::posix_time::ptime
tostd::chrono::time_point
.- This is not exactly needed, but I'd like to remove superfluous
boost
dependencies.
- This is not exactly needed, but I'd like to remove superfluous
- [x] Migrate parameters business to be
-
trac_ik_kinematics_plugin
: (#9)- [ ] Write the plugin for
moveit2
. - [ ] Update
moveit
documentation about thetrac_ik
library and about writing said plugins.
- [ ] Write the plugin for
-
trac_ik_python
: (#5)- [ ] Move from
rospy
torclpy
. - [ ] Use required
ament_cmake_python
functions to install the package. - [ ] Remove
boost
dependencies. - [ ] Move from
tf
/tf_conversions
totf2
/tf2_kdl
. - [ ] Settle on the
trac_ik
Python class API. What to do about the URDF string? Ideally it should mimictrac_ik_lib
. - [ ] Update tests to be ROS 2 compliant.
- [ ] Move from
-
trac_ik_examples
: (#2)- [x] Convert ROS 1 examples to ROS 2 equivalents.
- [x] Migrate launch file to be ROS 2 compliant.
- [x] Import a
pr2.urdf
file into the package launch tree.- This can be achieved by manually calling
xacro
on thepr2.urdf.xacro
from thepr2_description
package. - This is necessary because
pr2_common
is not published as a ROS 2 package.
- This can be achieved by manually calling
- [x] Migrate parameters business to be
rclcpp
compliant. - [x] Move from
boost::posix_time::ptime
tostd::chrono::time_point
.- This is not exactly needed, but I'd like to remove superfluous
boost
dependencies.
- This is not exactly needed, but I'd like to remove superfluous
- Miscellaneous:
- [ ] #10
- [ ] #11
- [ ] #7
- [x] Move all packages from
catkin
toament
. - [ ] Change name to
trac_ik2
? - [x] #8
- [x] #18
- [ ] #20
- [x] Remove previous release CHANGELOGs.
- [ ] #13
- [x] Remove previous tags.
- [ ] Migrate from math3d.h to Eigen for matrix math. https://github.com/aprotyas/trac_ik/issues/26#issue-1079566570
- Community (?):
- [x] #21
- [ ] #22
- [ ] #23
Notes:
- How should the parameter migration be done? ~~Should
TracIK
really inherit fromrclcpp::Node
just for logging and some param services?~~ - Should
TracIK
be composable? i. This has to happen if I want to add support for a URDF XML subscription callback forTracIK
.
Hi, I'm trying to get trac_ik_python compiling for ros2 but without success... I made the changes from rospy to rclpy and the like, but I mostly have problems with ament and swig right now. Do you have any clue on how to properly do that by any chance?
Hi @SteveNguyen, unfortunately I haven't had the time to look at trac_ik_python
yet. The "Move from rospy
to rclpy
" directive I've noted was only an initial hunch, and as you've seen already, there is probably a bunch more to do on top of that. I think you're on the right track because the rospy
-> rclpy
migration should be a big part of the port, but I'm not sure what to do after that.
TLDR: Give me a few hours to investigate, and I will report back here with any details I find. If you don't mind, can you open a draft PR for the ROS 2 port of trac_ik_python
? It'd be easier to track progress that way.
Edit:
@SteveNguyen, can you give me some items to base this conversation off of? What swig
problem are you having? Are you not able to use the swig
functions in CMake? How about for ament
? Linking errors? trac_ik_python
needs a little more careful consideration while porting because, as you can tell, it's not just a regular Python package. I'll update the TODO list to reflect this. Please share any updates/thoughts you may have!