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

Fix the test failure of wrong messages count #165

Merged
merged 1 commit into from
Oct 20, 2019

Conversation

evshary
Copy link
Contributor

@evshary evshary commented Sep 23, 2019

The PR is to fix the CI fail.

Generate rclcpp::Node before start_recording since rclcpp::Node will set
parameters of use_sim_time and publish message to parameter_events.
This will cause the wrong messages count in the test.

Signed-off-by: evshary evshary@gmail.com

@mabelzhang mabelzhang added the enhancement New feature or request label Oct 3, 2019
@Karsten1987
Copy link
Collaborator

CI on this (including cyclone):

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

@Karsten1987
Copy link
Collaborator

I think you have to rebase your branch to incorporate the latest changes to rosbag2. Specifically, I believe you're missing this commit: #166

@evshary
Copy link
Contributor Author

evshary commented Oct 8, 2019

I think you have to rebase your branch to incorporate the latest changes to rosbag2. Specifically, I believe you're missing this commit: #166

@Karsten1987 : I've already updated my PR. Thanks.

@Karsten1987
Copy link
Collaborator

new round of CI:

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

@Karsten1987
Copy link
Collaborator

build errors are unrelated. I'll re-trigger once the master build is restored.

@Karsten1987
Copy link
Collaborator

Sorry for taking so long for coming back on this.

Looks like CI has some problems running cyclone:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
--- stderr: rmw_cyclonedds_cpp
09:34:05 /home/jenkins-agent/workspace/ci_linux/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp: In function ‘rmw_publisher_t* rmw_create_publisher(const rmw_node_t*, const rosidl_message_type_support_t*, const char*, const rmw_qos_profile_t*)’:
09:34:05 /home/jenkins-agent/workspace/ci_linux/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:1088:30: error: conflicting declaration of C function ‘rmw_publisher_t* rmw_create_publisher(const rmw_node_t*, const rosidl_message_type_support_t*, const char*, const rmw_qos_profile_t*)’
09:34:05  extern "C" rmw_publisher_t * rmw_create_publisher(
09:34:05                               ^~~~~~~~~~~~~~~~~~~~
09:34:05 In file included from /home/jenkins-agent/workspace/ci_linux/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:39:0:
09:34:05 /home/jenkins-agent/workspace/ci_linux/ws/install/rmw/include/rmw/rmw.h:301:1: note: previous declaration ‘rmw_publisher_t* rmw_create_publisher(const rmw_node_t*, const rosidl_message_type_support_t*, const char*, const rmw_qos_profile_t*, const rmw_publisher_options_t*)’
09:34:05  rmw_create_publisher(
09:34:05  ^~~~~~~~~~~~~~~~~~~~
09:34:05 /home/jenkins-agent/workspace/ci_linux/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp: In function ‘rmw_subscription_t* rmw_create_subscription(const rmw_node_t*, const rosidl_message_type_support_t*, const char*, const rmw_qos_profile_t*, bool)’:
09:34:05 /home/jenkins-agent/workspace/ci_linux/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:1273:33: error: conflicting declaration of C function ‘rmw_subscription_t* rmw_create_subscription(const rmw_node_t*, const rosidl_message_type_support_t*, const char*, const rmw_qos_profile_t*, bool)’
09:34:05  extern "C" rmw_subscription_t * rmw_create_subscription(
09:34:05                                  ^~~~~~~~~~~~~~~~~~~~~~~
09:34:05 In file included from /home/jenkins-agent/workspace/ci_linux/ws/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/rmw_node.cpp:39:0:
09:34:05 /home/jenkins-agent/workspace/ci_linux/ws/install/rmw/include/rmw/rmw.h:538:1: note: previous declaration ‘rmw_subscription_t* rmw_create_subscription(const rmw_node_t*, const rosidl_message_type_support_t*, const char*, const rmw_qos_profile_t*, const rmw_subscription_options_t*)’
09:34:05  rmw_create_subscription(
09:34:05  ^~~~~~~~~~~~~~~~~~~~~~~
09:34:05 make[2]: *** [CMakeFiles/rmw_cyclonedds_cpp.dir/src/rmw_node.cpp.o] Error 1
09:34:05 make[1]: *** [CMakeFiles/rmw_cyclonedds_cpp.dir/all] Error 2
09:34:05 make: *** [all] Error 2
09:34:05 ---
09:34:05 Failed   <<< rmw_cyclonedds_cpp	[ Exited with code 2 ]
09:34:05

Is the current rmw_cyclone_dds package up to date with the ROS2 master? Or is that specifically aimed to only support dashing?
For master, you might need to incorporate ros2/rmw#187

@dirk-thomas
Copy link
Member

See ros2/rmw_cyclonedds#46.

@Karsten1987
Copy link
Collaborator

Karsten1987 commented Oct 19, 2019

I just realized that this fix also helps this make this test non-flaky on other RMWs:

Running CI:

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

@wjwwood just fyi

@Karsten1987
Copy link
Collaborator

@evshary Can you please rebase this branch to run CI one more time?

Generate rclcpp::Node before start_recording since rclcpp::Node will set
parameters of use_sim_time and publish message to parameter_events.
This will cause the wrong messages count in the test.

Signed-off-by: evshary <evshary@gmail.com>
@evshary
Copy link
Contributor Author

evshary commented Oct 20, 2019

@evshary Can you please rebase this branch to run CI one more time?

@Karsten1987 I've rebased the branch, but there are still some errors in CI. It seems it's not related to this PR?

19:01:29 /tmp/ws/src/rosbag2/rosbag2/src/rosbag2/types/introspection_message.cpp: In function ‘std::shared_ptr<rosbag2_introspection_message_t> rosbag2::allocate_introspection_message(const rosidl_message_type_support_t*, const rcutils_allocator_t*)’:
19:01:29 /tmp/ws/src/rosbag2/rosbag2/src/rosbag2/types/introspection_message.cpp:40:21: error: ‘const struct rosidl_typesupport_introspection_cpp::MessageMembers’ has no member named ‘init_function’
19:01:29    intro_ts_members->init_function(
19:01:29                      ^~~~~~~~~~~~~
19:01:29 /tmp/ws/src/rosbag2/rosbag2/src/rosbag2/types/introspection_message.cpp:41:32: error: ‘rosidl_generator_cpp’ has not been declared
19:01:29      raw_ros2_message->message, rosidl_generator_cpp::MessageInitialization::ALL);
19:01:29                                 ^~~~~~~~~~~~~~~~~~~~
19:01:29 /tmp/ws/src/rosbag2/rosbag2/src/rosbag2/types/introspection_message.cpp: In function ‘void rosbag2::deallocate_introspection_message(rosbag2_introspection_message_t*, const rosidl_message_type_support_t*)’:
19:01:29 /tmp/ws/src/rosbag2/rosbag2/src/rosbag2/types/introspection_message.cpp:65:21: error: ‘const struct rosidl_typesupport_introspection_cpp::MessageMembers’ has no member named ‘fini_function’
19:01:29    intro_ts_members->fini_function(msg->message);
19:01:29                      ^~~~~~~~~~~~~
19:01:29 CMakeFiles/rosbag2.dir/build.make:206: recipe for target 'CMakeFiles/rosbag2.dir/src/rosbag2/types/introspection_message.cpp.o' failed
19:01:29 CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/rosbag2.dir/all' failed
19:01:29 Makefile:140: recipe for target 'all' failed
19:01:29 make[2]: *** [CMakeFiles/rosbag2.dir/src/rosbag2/types/introspection_message.cpp.o] Error 1
19:01:29 make[1]: *** [CMakeFiles/rosbag2.dir/all] Error 2
19:01:29 make: *** [all] Error 2

@Karsten1987
Copy link
Collaborator

please make sure you're up to date with the rest of your packages as well. So in this case, you are missing the latest updates from the rosidl repository.

@Karsten1987
Copy link
Collaborator

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

@Karsten1987 Karsten1987 merged commit 6a5c50e into ros2:master Oct 20, 2019
@Karsten1987
Copy link
Collaborator

thanks for iterating over this with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants