-
Notifications
You must be signed in to change notification settings - Fork 26
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
[noetic] Fix install and improve Python 3 support + python2.7 StringIO fix #97
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Mikael Arguedas <[email protected]>
Signed-off-by: Mikael Arguedas <[email protected]>
Signed-off-by: Mikael Arguedas <[email protected]>
Signed-off-by: Mikael Arguedas <[email protected]>
Signed-off-by: Mikael Arguedas <[email protected]>
Signed-off-by: Mikael Arguedas <[email protected]>
Melodic build failed with
Maybe it just didn't get enough CPU. @ros-pull-request-builder retest this please |
Second build failed with
|
All tests pass for me on 16.04/kinetic BTW. |
@ros-pull-request-builder retest this please |
Fixes the following errors reported by catkin_lint: capabilities: error: build_export_depend 'message_runtime' is not listed in catkin_package() capabilities: error: message dependency 'std_srvs' is not listed in catkin_package() capabilities: error: message dependency 'std_msgs' is not listed in catkin_package() capabilities: error: message dependency 'std_srvs' is not listed as build_export_depend capabilities: error: message dependency 'std_msgs' is not listed as build_export_depend
The bionic tests keep failing with:
and
even though I increased the timeout to 30s. From the log times it looks like it is indeed waiting the 30s before failing: 13:26:55 �]2;/tmp/ws/src/capabilities/src/capabilities/capability_server_nodelet_manager.launch� 13:26:55 �[1mstarted roslaunch server http://cf9aa1763d55:34951/�[0m 13:26:55 13:26:55 SUMMARY 13:26:55 ======== 13:26:55 13:26:55 PARAMETERS 13:26:55 * /rosdistro: melodic 13:26:55 * /rosversion: 1.14.12 13:26:55 13:26:55 NODES 13:26:55 / 13:26:55 capability_server_nodelet_manager (nodelet/nodelet) 13:26:55 13:26:55 �[1mROS_MASTER_URI=http://cf9aa1763d55:38519/�[0m 13:26:55 �]2;/tmp/ws/src/capabilities/src/capabilities/capability_server_nodelet_manager.launch http://cf9aa1763d55:38519/� 13:26:55 �[1mprocess[capability_server_nodelet_manager-1]: started with pid [1275]�[0m 13:26:56 [DEBUG] [1643113645.793882]: connecting to cf9aa1763d55 44723 13:27:25 [capability_server_nodelet_manager-1] killing on exit 13:27:25 �[0m[ INFO] [1643113616.146610651]: Initializing nodelet with 4 worker threads.�[0m 13:27:26 shutting down processing monitor... 13:27:26 ... shutting down processing monitor complete 13:27:26 �[1mdone�[0m 13:27:26 [Testcase: testdefault_provider] ... ok 13:27:26 13:27:26 [ROSTEST]----------------------------------------------------------------------- 13:27:26 13:27:26 [capabilities.rosunit-default_provider/test_default_provider][FAILURE]---------- 13:27:26 File "/usr/lib/python2.7/unittest/case.py", line 329, in run 13:27:26 testMethod() 13:27:26 File "/tmp/ws/src/capabilities/test/rostest/test_server/test_default_provider.py", line 19, in test_default_provider 13:27:26 assert wait_for_capability_server(30) 13:27:26 -------------------------------------------------------------------------------- 13:27:26 13:27:26 13:27:26 SUMMARY 13:27:26 �[1;31m * RESULT: FAIL�[0m 13:27:26 * TESTS: 1 13:27:26 * ERRORS: 0 13:27:26 �[1;31m * FAILURES: 1�[0m @wjwwood any ideas? |
src/capabilities/server.py
Outdated
@@ -380,7 +380,7 @@ def spin(self): | |||
self.handle_get_remappings) | |||
|
|||
rospy.loginfo("Capability Server Ready") | |||
rospy.Publisher("~events", CapabilityEvent, queue_size=1000).publish( | |||
rospy.Publisher("~events", CapabilityEvent, queue_size=1000, latch=True).publish( |
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.
I'm not sure latching is the right solution here. The problem is that these events are meant to be ephemeral. Consider the situation where a subscription to the event is created long after the server started, it will always receive the last event even if it didn't happen recently. This might be the SEVER_READY event, which might be harmless, but it might also be some other event. The way the publishers work in rospy, is that it's a singleton, so if you set it latched here, I believe it will affect all other instances of this publisher for this topic.
I think a better solution would be to either periodically publish this event (or a "still alive" heart beat), or create a new service that can be called at anytime to see if the server is ready, and have the client call that in case it missed the event.
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.
Thanks for the feedback. I have only seen one publish call in this file so I thought this would be fine. Now I see the topic is also used in launch_manager.py
.
I don't want to dig too deep here. I'll try the periodically publishing.
@wjwwood I implemented the heartbeat (publishing SERVER_READY every 1s (configurable)) and tests pass.
|
Contains @mikaelarguedas fixes from #94 plus a few commits to add a python2.7 compatible way of using StringIO and make the bionic build pass.
Also fixes some package.xml/CMakeLists.txt errors that are reported by
catkin_lint
.