Conversation
|
Should ROS 1 specific concepts like connection headers, caller id, etc. be removed? |
j-rivero
left a comment
There was a problem hiding this comment.
Two small comments on building and python tests, I was not able to find any more errors. Build and tests are fine on my Ubuntu Bionic system.
CMakeLists.txt
Outdated
| find_package(rclcpp REQUIRED) | ||
| find_package(rcutils) | ||
| find_package(builtin_interfaces REQUIRED) | ||
| find_package(std_msgs REQUIRED) |
There was a problem hiding this comment.
I can only find std_mgs in test/test_message_filters_cache.py. If this is the case, I think that we can apply this patch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81fcb1e..c982b47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,6 @@ find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rcutils)
find_package(builtin_interfaces REQUIRED)
-find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
include_directories(include)
@@ -24,7 +23,6 @@ add_library(${PROJECT_NAME} SHARED src/connection.cpp)
ament_target_dependencies(${PROJECT_NAME}
"rclcpp"
"rcutils"
- "std_msgs"
"builtin_interfaces"
"sensor_msgs")
@@ -53,6 +51,8 @@ ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
if(BUILD_TESTING)
+ find_package(std_msgs REQUIRED)
+
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
diff --git a/package.xml b/package.xml
index 0d159d1..fc490be 100644
--- a/package.xml
+++ b/package.xml
@@ -19,9 +19,9 @@
<build_depend>builtin_interfaces</build_depend>
<build_depend>rclcpp</build_depend>
<build_depend>rclpy</build_depend>
- <build_depend>std_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
+ <test_depend>std_msgs</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_cmake_pytest</test_depend>| target_link_libraries(${PROJECT_NAME}-test_fuzz ${PROJECT_NAME}) | ||
| endif() | ||
|
|
||
| # Unit test of the approximate synchronizer |
There was a problem hiding this comment.
Looks like the python tests were not ported or I can not find them. Not sure if this was on propose.
There was a problem hiding this comment.
yes, @tfoote focuses on the CPP part now, the python part hasn't been involved in this PR.
gaoethan
left a comment
There was a problem hiding this comment.
From my simple checking, the following remains to do:
- missing python refactoring, maybe it's another PR.
- readme update
- The rest APIs doc update accordingly with ros2
| * POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
|
|
||
| #ifndef ROSLIB_MESSAGE_TRAITS_H |
There was a problem hiding this comment.
Maybe the prefix of ROSLIB is not very suitable now in ROS2
| * POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
|
|
||
| #ifndef ROSCPP_PARAMETER_ADAPTER_H |
There was a problem hiding this comment.
ROSCPP needs to be replaced accordingly now.
| ROS_DEPRECATED inline std::shared_ptr<M> defaultMessageCreateFunction() | ||
| { | ||
| return DefaultMessageCreator<M>()(); | ||
| } |
There was a problem hiding this comment.
It's already been marked as ROS_DEPRECATED and better clean it if no use now.
include/message_filters/subscriber.h
Outdated
| @@ -88,30 +84,27 @@ typedef boost::shared_ptr<SubscriberBase> SubscriberBasePtr; | |||
| * | |||
| * The output connection for the Subscriber object is the same signature as for roscpp subscription callbacks, ie. | |||
include/message_filters/subscriber.h
Outdated
| } | ||
|
|
||
| /** | ||
| * \brief Returns the internal ros::Subscriber object |
| @@ -67,31 +68,31 @@ namespace message_filters | |||
| * | |||
| * TimeSequencer's input and output connections are both of the same signature as roscpp subscription callbacks, ie. | |||
There was a problem hiding this comment.
doc update like ros::Duration, roscpp ...
| * \param update_rate The rate at which to check for messages which have passed "delay" | ||
| * \param queue_size The number of messages to store | ||
| * \param nh (optional) The NodeHandle to use to create the ros::SteadyTimer that runs at update_rate | ||
| * \param node The Node to use to create the ros::SteadyTimer that runs at update_rate |
There was a problem hiding this comment.
doc update for ros::SteadyTimer
| * \param update_rate The rate at which to check for messages which have passed "delay" | ||
| * \param queue_size The number of messages to store | ||
| * \param nh (optional) The NodeHandle to use to create the ros::SteadyTimer that runs at update_rate | ||
| * \param node The Node to use to create the ros::SteadyTimer that runs at update_rate |
There was a problem hiding this comment.
doc update for ros::SteadyTimer
include/message_filters/cache.h
Outdated
| @@ -59,15 +60,15 @@ namespace message_filters | |||
| * | |||
| * Cache's input and output connections are both of the same signature as roscpp subscription callbacks, ie. | |||
| @@ -127,11 +128,11 @@ class Cache : public SimpleFilter<M> | |||
| */ | |||
There was a problem hiding this comment.
better clean it for ROS_ERROR like //ROS_ERROR("Cannot set max_size to 0") ; at line 109
|
@tfoote it works within my Ubuntu bionic, thanks for your effort 👍 |
|
Thanks for the reviews. I believe I've addressed all comments and have now finished cleaning up all items I flagged as well. It's ready for a review. |
| @@ -0,0 +1,73 @@ | |||
| /* | |||
There was a problem hiding this comment.
In the past when we copied code from other repos (without the file's history) we place a comment in the file pointing to where the file was copied from (e.g. https://github.com/ros2/turtlebot2_demo/blob/2017ddd2c5781434d9dbcb0c172d553e28f7ab02/depthimage_to_pointcloud2/include/depthimage_to_pointcloud2/depth_traits.hpp#L34)
Then adapting the header guards (as mentioned in https://github.com/ros2/message_filters/diffs#r206407588) to match the name of the new hosting package is IMO preferred but not a blocker for merging
There was a problem hiding this comment.
Yeah I did, but I wanted to get this in since it was blocking our other steps. I'll open a new PR with the sources.
There was a problem hiding this comment.
Yeah I did, but I wanted to get this in since it was blocking our other steps. I'll open a new PR with the sources.
👍 sounds good, just wanted to make sure it didnt get lost in the process.
Thanks for opening the follow-up PR!
Use internal MessageEvent, traits, TODO needs noncopyable first. Should use '= delete' instead https://stackoverflow.com/questions/31940886/is-there-a-stdnoncopyable-or-equivalent TODO std::cout used instead of ROS_WARN_STREAM equivalent TODO assert migration TODO ROS_BREAK equivalent
TODO(tfoote) find why
This gets rid of the need for the accessor too.
And remove all references to NodeHandle and call everything nodes as they are.
Remove old roscpp references from docs and an include guard.
Provide migration path #define and TODO for resolving once provided upstream in ros2/rcutils#112
This is a rework of #4 for better traceability of code origin as well as some cleanup.
I've been splitting it into many different commits for easier auditing. I've separated out copying in files from different locations from converting them to the new syntax.
After that restructuring I've then gone through and been doing reviews of the changes.
There's now more commits in the history than I plan to have at the end. Several of the later ones are reverting non-essential changes earlier. I plan to find where they were changed and squash the revert of the changes down.
Outstanding TODOs
implement correct solutions for
ros::Time::setNow(ros::Time::now() + ros::Duration(2));
removed from test.
@j-rivero @mjcarroll @gaoethan If you could take a look and give any feedback/comments suggestions I'll pull them in as i finish my audit and cleanup before a final review.
@mjcarroll Please look closely at c7f8d24 and abe143a It's a slight change in the API that I made based on talking with @wjwwood