Issues with ROS2 Crystal: first steps with "colcon tests" and the listener-talker demo
I tried to work a bit on ROS2. It seems that I misused it and got some errors.
On a freshly installed Ubuntu 18.04 Virtual Machine, I installed ROS2 Crystal via Debian packages: https://index.ros.org/doc/ros2/Linux-...
Then, I followed the colcon tutorial: https://index.ros.org/doc/ros2/Colcon... . The following command lines were okay.
wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
vcs import ~/ros2_ws/src < ros2.repos
Then colcon build --symlink-install
worked okay, but gave a bit of warning
Summary: 228 packages finished [26min 38s]
3 packages had stderr output: qt_gui_cpp ros1_bridge rqt_gui_cpp
When I run colcon test
, I got errors:
summary: 227 packages finished [12min 16s]
1 package failed: ros2topic
25 packages had stderr output: composition demo_nodes_cpp demo_nodes_cpp_native image_tools intra_process_demo logging_demo message_filters osrf_pycommon rcl rcl_action rclcpp rclcpp_action rclcpp_lifecycle rclpy rqt rviz_common rviz_default_plugins rviz_rendering rviz_rendering_tests test_cli test_cli_remapping test_communication test_rclcpp tf2_ros tlsf_cpp
23 packages had test failures: composition demo_nodes_cpp demo_nodes_cpp_native image_tools intra_process_demo logging_demo message_filters rcl rcl_action rclcpp rclcpp_action rclcpp_lifecycle rclpy rviz_common rviz_default_plugins rviz_rendering rviz_rendering_tests test_cli test_cli_remapping test_communication test_rclcpp tf2_ros tlsf_cpp
After sourcing local_setup.bash
, I tried the demo
ros2 run demo_nodes_cpp listener &ros2 run demo_nodes_cpp talker
The command line failed:
zhfu@ubuntu:~/ros2_ws$ ros2 run demo_nodes_cpp listener & ros2 run demo_nodes_cpp talker
[1] 10554
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
[1]+ Exit 250 ros2 run demo_nodes_cpp listener
Why did I get a logic error? Cam someone help diagnose the issue?