-
Notifications
You must be signed in to change notification settings - Fork 198
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
New approach for toMsg()/fromMsg() #368
Conversation
8b44a4b
to
11190f3
Compare
de72a43
to
32a6d7f
Compare
6cc44b9
to
5b74e32
Compare
Just rebased onto ROS2, I hope I didn't drop anything. |
Friendly ping |
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.
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.
CI is failing https://ci.ros2.org/job/ci_linux-aarch64/8809/console
Maybe you need to add here sensor_msgs
Sorry I forgot this PR. I would prefer to add the |
bullet uses floats, which causes narrowing warnings
3bbc20d
to
3278ca2
Compare
Okay, I agree 😀 |
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.
some nits and comments
alwaysFalse<Datatype>, | ||
"No default message type defined, " | ||
"please check your header file includes!"); | ||
// using type = ...; |
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.
remove ?
alwaysFalse<Datatype>, | ||
"No default transform type defined, " | ||
"please check your header file includes!"); | ||
// using type = ...; |
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.
remove ?
// void toMsg(const Datatype&, Message&); | ||
// void fromMsg(const Message&, Datatype&); |
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.
remove ?
// using UntampedType = ...; | ||
// static UntampedType& accessMessage(StampedMsg &); | ||
// static UntampedType getMessage(StampedMsg const&); | ||
// static CovarianceType & accessCovariance(MsgWithCovarianceStamped &); | ||
// static CovarianceType getCovariance(MsgWithCovarianceStamped const&); |
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.
remove ?
// using StampedType = ...; | ||
// using StampedTypeWithCovariance = ...; |
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.
remove ?
if you don't want to remove these comments at least add a comment explaining the meaning. (some for all)
tf2_geometry_msgs/CMakeLists.txt
Outdated
@@ -30,6 +30,17 @@ ament_auto_find_build_dependencies(REQUIRED ${required_dependencies}) | |||
if(BUILD_TESTING) | |||
find_package(ament_cmake_gtest REQUIRED) | |||
find_package(rclcpp REQUIRED) | |||
|
|||
find_package(ament_cmake_cppcheck REQUIRED) |
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.
why don't you add common ? instead of run only 4 tests?
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.
cppcheck needs to be called manually (with the LANGUAGE "c++"
option), because of the header file suffix being .h
. Otherwise it would only recognize them as plain C headers and complain about non-C code.
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.
You should be able to configure this before.
Some ament links:
find_package(ament_cmake_gtest REQUIRED) | ||
find_package(ament_cmake_pytest REQUIRED) | ||
|
||
#ament_add_pytest_test(test_tf2_sensor_msgs_py test/test_tf2_sensor_msgs.py) |
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.
add a TODO or remove
tf2_kdl/CMakeLists.txt
Outdated
@@ -34,6 +34,14 @@ if(BUILD_TESTING) | |||
find_package(rclcpp REQUIRED) | |||
find_package(tf2_msgs REQUIRED) | |||
|
|||
find_package(ament_cmake_cppcheck REQUIRED) |
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.
some here ? why only these 4 tests?
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
tf2_geometry_msgs/CMakeLists.txt
Outdated
@@ -30,6 +30,17 @@ ament_auto_find_build_dependencies(REQUIRED ${required_dependencies}) | |||
if(BUILD_TESTING) | |||
find_package(ament_cmake_gtest REQUIRED) | |||
find_package(rclcpp REQUIRED) | |||
|
|||
find_package(ament_cmake_cppcheck REQUIRED) |
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.
You should be able to configure this before.
Some ament links:
9646a40
to
0dbe030
Compare
Thanks for the hint for |
Friendly ping for another CI shot 😁 |
Due to the latest changes on the ros2 branch, a lot of merge conflicts arised. As I don't see a lot of activity in this PR, I came to the conclusion that this PR won't be merged and that I can stop working on it. I guess someone else has to fix the underlying issues... |
I was the cause of the conflicts, so apologies for that. I can go ahead and fix them, if you'd like. However, it would be a lot easier if this PR was cleaned up a bit. In particular, it would be much better if we split parts of this out into smaller PRs (particularly things like the tests), and also consolidated the 51 commits into a more manageable number. @gleichdick are you willing to do that? |
Closed in favor of #427 |
I did a complete rework of the conversion utilities, with the goal to avoid link-time errors and to make
tf2::convert
more bullet-proof. In ROS1, various issues arised, mainly because of the forward declaration oftoMsg()
as a templated function, followed by the implementations for Eigen, KDL and friends being traditional overloaded functions (withouttemplate<>
, so no specialization). This is a port of ros/geometry2#491 and addresses #242.Now,
fromMsg()
andtoMsg()
both have a default implementation, by redirecting intoimpl::ImplDetails
structs. SFINAE with structs allow some more flexibility than the current approach, with the bonus of compile-time errors when a specific implementation is missing.The converison of stamped types
geometry_msgs::...Stamped
andtf2::Stamped<T>
now uses the conversion functions of the underlying unstamped types.To do: