Skip to content
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

enable message_filters support of python interfaces and tests #7

Merged
merged 13 commits into from
Sep 26, 2018

Conversation

gaoethan
Copy link
Contributor

I ported the message_filters ROS2 python support here and it mainly involves the following changes:

  • replace Subsciber with ROS2 Subscriber
  • use ROS2 ROSTIME to support headerless messages for Cache and ApproximateTimeSynchronizer
  • use ROS2 rclpy root logger for logging
  • enable exact timestamp policy for with TimeSynchronizer
  • enable approximate timestamp policy for messages with header
  • enable approximate timestamp policy test for headerless messages
  • enable message cache for messages with header
  • enable message cache for for headerless messages
  • fix doc and coding style issue
  • enable the relevant tests with ament_cmake_pytest

@tfoote tfoote added the in review Waiting for review (Kanban column) label Aug 19, 2018
@gaoethan
Copy link
Contributor Author

@tfoote @mjcarroll @dirk-thomas maybe you have some extra feedback, please help review and kindly share, thanks !

@dirk-thomas dirk-thomas requested a review from tfoote August 23, 2018 17:18
tfoote
tfoote previously requested changes Aug 24, 2018
Copy link
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @gaoethan I've had a quick look through and generally it looks good. I made a handful of line by line comments on things. My main feedback overall is that there's a bunch of changes that are formatting only and if we could reduce them that would be great for readability of the patch and longer term maintenance.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
package.xml Outdated Show resolved Hide resolved
src/message_filters/__init__.py Outdated Show resolved Hide resolved
src/message_filters/__init__.py Outdated Show resolved Hide resolved
src/message_filters/__init__.py Outdated Show resolved Hide resolved
src/message_filters/__init__.py Outdated Show resolved Hide resolved
src/message_filters/__init__.py Show resolved Hide resolved
test/test_message_filters_cache.py Outdated Show resolved Hide resolved
@gaoethan
Copy link
Contributor Author

@tfoote @dirk-thomas Any further feedback ? pls share and I can address it to close the gap ASAP, thanks !

@dirk-thomas dirk-thomas mentioned this pull request Sep 4, 2018
8 tasks
@dirk-thomas
Copy link
Member

@tfoote Can you pleae give this another review. Thanks.

@gaoethan
Copy link
Contributor Author

gaoethan commented Sep 7, 2018

@tfoote I think that I have already resolved all the reviewing points from you except for the one of using of root logger. whether to use root logger or introduce a node but merely for using get_logger() instead of root logger, I personally don't prefer to do like that and it's too heavy, so it needs a final decision.

BTW, I suggest to merge and close this PR firstly if you guys agree the current changes, but open another new issue/PR to track the point of using root logger separately to avoid this PR pending for a long time. thanks for your great feedback.

@mikaelarguedas mikaelarguedas dismissed tfoote’s stale review September 11, 2018 00:56

feedback addressed, new review requested

@tfoote
Copy link
Contributor

tfoote commented Sep 11, 2018

For the short term please at least use the public API rclpy.logging.get_logger with a useful name. https://github.com/ros2/rclpy/blob/master/rclpy/rclpy/logging.py#L40

This will at least make it a little bit more readable.

However we've been looking at this elsewhere and for useful logging we will likely need to pass in the logger objects so that they can be remapped and otherwise grouped appropriately. So adding the logger to the init signature wouldn't be unreasonable. We can ticket that as a follow up.

@gaoethan
Copy link
Contributor Author

Now it's already changed to use the named logger with rclpy.logging.get_logger(). additionally, create the issue #8 for the follow-up optimization. thanks !

@tfoote
Copy link
Contributor

tfoote commented Sep 12, 2018

Pushed to https://github.com/ros2/message_filters/tree/refactor_py for easier CI running now:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mikaelarguedas
Copy link
Member

@tfoote I believe message_filters is not in the repos file so it will not be tested on regular CI.

@gaoethan
Copy link
Contributor Author

Link it to #2 for easy tracking

@dirk-thomas
Copy link
Member

@tfoote To run CI.

@tfoote
Copy link
Contributor

tfoote commented Sep 21, 2018

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mjcarroll
Copy link
Member

This is the relevant failing bit on Windows:

03:24:38   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /IC:\J\workspace\ci_windows\ws\src\ros\angles\include /IC:\J\workspace\ci_windows\ws\install\src\gtest_vendor\include /IC:\J\workspace\ci_windows\ws\install\include /nologo /W3 /WX- /diagnostics:classic /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++14 /Fo"message_filters-test_exact_time_policy.dir\Release\\" /Fd"message_filters-test_exact_time_policy.dir\Release\vc141.pdb" /Gd /TP /errorReport:queue C:\J\workspace\ci_windows\ws\src\ros\angles\test\test_exact_time_policy.cpp
03:24:38   test_exact_time_policy.cpp
03:24:38 C:\J\workspace\ci_windows\ws\src\ros\angles\include\message_filters/sync_policies/exact_time.h(119): error C2059: syntax error: 'template' [C:\J\workspace\ci_windows\ws\build\message_filters\message_filters-test_exact_time_policy.vcxproj]
03:24:38   C:\J\workspace\ci_windows\ws\src\ros\angles\test\test_exact_time_policy.cpp(156): note: see reference to function template instantiation 'message_filters::Connection message_filters::sync_policies::ExactTime<Msg,Msg,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType>::registerDropCallback<std::_Binder<std::_Unforced,void (__cdecl Helper::* )(void),Helper *>>(const C &)' being compiled
03:24:38           with
03:24:38           [
03:24:38               C=std::_Binder<std::_Unforced,void (__cdecl Helper::* )(void),Helper *>
03:24:38           ]
03:24:38   C:\J\workspace\ci_windows\ws\src\ros\angles\test\test_exact_time_policy.cpp(156): note: see reference to function template instantiation 'message_filters::Connection message_filters::sync_policies::ExactTime<Msg,Msg,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType,message_filters::NullType>::registerDropCallback<std::_Binder<std::_Unforced,void (__cdecl Helper::* )(void),Helper *>>(const C &)' being compiled
03:24:38           with
03:24:38           [
03:24:38               C=std::_Binder<std::_Unforced,void (__cdecl Helper::* )(void),Helper *>
03:24:38           ]
03:24:38 Done Building Project "C:\J\workspace\ci_windows\ws\build\message_filters\message_filters-test_exact_time_policy.vcxproj" (default targets) -- FAILED.

@mikaelarguedas
Copy link
Member

The failure looks C++ related and independent of these Python changes.
@tfoote @mjcarroll Was the initial port tested on Windows?
CI with this additional repos file to see if master builds:

Build Status

@tfoote
Copy link
Contributor

tfoote commented Sep 25, 2018

@mjcarroll validated image_transport working on Windows so it was known to be working. Unless the screenshots are of the new bionic env that looks just like windows.

@mjcarroll
Copy link
Member

Image transport hasn't worked on CI on Windows, as it requires addition dependencies, but message_filters has worked in the past. @tfoote Do you want to look into this or do you want me to?

@tfoote
Copy link
Contributor

tfoote commented Sep 25, 2018

I'm not going to have time to look at this until after ROSCon and vacation the week after. If you have time that would be great.

@tfoote
Copy link
Contributor

tfoote commented Sep 26, 2018

We talked about this in the ROS2 meeting and since it's not a regression caused by this we'll merge this and ticket the regressions separately.

@tfoote tfoote merged commit 3bfc64a into ros2:master Sep 26, 2018
@tfoote tfoote removed the in review Waiting for review (Kanban column) label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants