-
Notifications
You must be signed in to change notification settings - Fork 276
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
Create a version of tf2 for ros2. #135
Conversation
It is tested up to static_transform_publisher and tf2_echo and tf2_monitor are working.
ament_lint_auto_find_test_dependencies() | ||
|
||
ament_add_gtest(test_cache_unittest test/cache_unittest.cpp) | ||
target_link_libraries(test_cache_unittest tf2 ${geometry_msgs_LIBRARIES} ${console_bridge_LIBRARIES}) |
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 must check if the gtest target actually exists.
Same below.
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.
Added
The patch shows how invasive the types |
#include <builtin_interfaces/msg/time.hpp> | ||
|
||
// TODO(tfoote) | ||
#error This has not been converted to ROS2 and will not compile |
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.
Is this needed for ros2 support or is this ok to overlook in this pr?
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 currently commented out of the build as the datatype conversions packages were not included. This is how you interact with them. You have to use either the message datatypes or the tf2 native datatypes.
@@ -61,7 +61,7 @@ int main(int argc, char** argv) | |||
nh.param("buffer_size", buffer_size, 120.0); | |||
|
|||
// WIM: this works fine: | |||
tf2_ros::Buffer buffer_core(ros::Duration(buffer_size+0)); // WTF?? | |||
tf2_ros::Buffer buffer_core(tf2::TempDuration(buffer_size+0)); // WTF?? |
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.
lol
Well, other than my comments I guess I'd +1 this for merge. However, it still needs a lot of work and it is a bit discouraging that we don't have tests to verify that things behave as expected. There are a bunch of workarounds in this pr which just change the way |
I created the aliases for tf2::TimePoint and tf2::Duration and deployed them through the compiling code. I also cleaned up a few windowsisms necessary to build. CI: |
Create a version of tf2 for ros2.
It is tested up to static_transform_publisher and tf2_echo and tf2_monitor are working.