osrf / docker_images

A repository to hold definitions of docker images maintained by OSRF
Apache License 2.0
557 stars 170 forks source link

Autocomplete in humble image freezes #687

Closed jonipol closed 10 months ago

jonipol commented 1 year ago

I have been migrating our code base to Humble and I am using a ros:humble image as the base. Quite often the autocomplete freezes completely. This happens on both fastrtps and cyclonedds.

I was not able to reproduce this on local installation of humble-core. So it only happens inside the container.

Steps to reproduce

  1. Docker run the image with bash
  2. source /opt/ros/humble/setup.bash
  3. Start typing using the autocomplete

In the log below you can see that the autocomplete works well when looking for options for ros2 action but then freezes if trying to tab when send_goal has been added to the command. Only after pressing "ctrl + c" the command line becomes responsive again.

Expected output for the completion would be in this case a list of available actions or -.

joni:~$ docker run --network host -it ros:humble bash
root@joni-Lenovo-Legion-7-15IMH05:/# . /opt/ros/humble/setup.bash 
root@joni-Lenovo-Legion-7-15IMH05:/# ros2 action 
info       list       send_goal  
-^Ct@joni-Lenovo-Legion-7-15IMH05:/# ros2 action send_goal ^C
root@joni-Lenovo-Legion-7-15IMH05:/# ros2 wtf -r

   NETWORK CONFIGURATION
inet         : 10.50.0.1
inet4        : ['127.0.0.1', '10.50.0.1']
inet6        : ['::1']
netmask      : 255.255.255.240
device       : lo
flags        : 73<UP,RUNNING,LOOPBACK>
mtu          : 65536
inet         : 10.0.0.132
inet4        : ['192.168.50.253', '10.0.0.132']
ether        : a8:7e:ea:45:6b:0e
inet6        : ['fe80::82a8:ca6b:8da5:d26%wlp0s20f3']
netmask      : 255.255.255.255
device       : wlp0s20f3
flags        : 4163<UP,MULTICAST,BROADCAST,RUNNING>
mtu          : 1500
broadcast    : 10.0.0.132
inet         : 172.17.0.1
inet4        : ['172.17.0.1']
ether        : 02:42:ba:aa:5d:26
inet6        : ['fe80::42:baff:feaa:5d26%docker0']
netmask      : 255.255.0.0
device       : docker0
flags        : 4099<UP,MULTICAST,BROADCAST>
mtu          : 1500
broadcast    : 172.17.255.255
inet         : 10.0.0.132
inet4        : ['10.0.0.132']
inet6        : ['fe80::65a:ff0d:ca0a:fe2f%tun0']
netmask      : 255.255.255.255
device       : tun0
flags        : 4305<PTP,NOARP,MULTICAST,UP,RUNNING>
mtu          : 1500
ether        : 7c:8a:e1:44:15:f8
device       : enp65s0
flags        : 4099<UP,MULTICAST,BROADCAST>
mtu          : 1500
ether        : f8:e4:3b:8a:58:d6
device       : enxf8e43b8a58d6
flags        : 4099<UP,MULTICAST,BROADCAST>
mtu          : 1500

   PACKAGE VERSIONS
nav_msgs                                  : latest=4.2.3, local=4.2.3
geometry_msgs                             : latest=4.2.3, local=4.2.3
rosidl_typesupport_interface              : latest=3.1.5, local=3.1.4
console_bridge_vendor                     : latest=1.4.1, local=1.4.1
rcl_lifecycle                             : latest=5.3.4, local=5.3.3
ros2cli_common_extensions                 : latest=0.1.1, local=0.1.1
rosidl_typesupport_introspection_cpp      : latest=3.1.5, local=3.1.4
ament_cmake_uncrustify                    : latest=0.12.7, local=0.12.6
rmw_fastrtps_cpp                          : latest=6.2.3, local=6.2.2
ament_cmake_flake8                        : latest=0.12.7, local=0.12.6
ros2launch                                : latest=0.19.5, local=0.19.4
rosidl_cli                                : latest=3.1.5, local=3.1.4
rosidl_generator_c                        : latest=3.1.5, local=3.1.4
ament_flake8                              : latest=0.12.7, local=0.12.6
ros_workspace                             : latest=1.0.2, local=1.0.2
ros2multicast                             : latest=0.18.7, local=0.18.6
launch_xml                                : latest=1.0.4, local=1.0.4
ament_cmake_export_dependencies           : latest=1.3.5, local=1.3.5
statistics_msgs                           : latest=1.2.1, local=1.2.1
ament_package                             : latest=0.14.0, local=0.14.0
tracetools                                : latest=4.1.1, local=4.1.1
ament_lint_common                         : latest=0.12.7, local=0.12.6
rcpputils                                 : latest=2.4.1, local=2.4.1
rmw                                       : latest=6.1.1, local=6.1.1
ros2run                                   : latest=0.18.7, local=0.18.6
pluginlib                                 : latest=5.1.0, local=5.1.0
stereo_msgs                               : latest=4.2.3, local=4.2.3
ament_cmake_copyright                     : latest=0.12.7, local=0.12.6
libstatistics_collector                   : latest=1.3.1, local=1.3.1
uncrustify_vendor                         : latest=2.0.2, local=2.0.2
rosidl_default_runtime                    : latest=1.2.0, local=1.2.0
ament_cmake_export_include_directories    : latest=1.3.5, local=1.3.5
ament_cmake_core                          : latest=1.3.5, local=1.3.5
actionlib_msgs                            : latest=4.2.3, local=4.2.3
rosidl_runtime_cpp                        : latest=3.1.5, local=3.1.4
diagnostic_msgs                           : latest=4.2.3, local=4.2.3
rmw_implementation_cmake                  : latest=6.1.1, local=6.1.1
rclcpp                                    : latest=16.0.5, local=16.0.4
rcl_logging_spdlog                        : latest=2.3.1, local=2.3.1
ament_xmllint                             : latest=0.12.7, local=0.12.6
sensor_msgs                               : latest=4.2.3, local=4.2.3
rmw_dds_common                            : latest=1.6.0, local=1.6.0
ament_copyright                           : latest=0.12.7, local=0.12.6
ament_pep257                              : latest=0.12.7, local=0.12.6
rcl_yaml_param_parser                     : latest=5.3.4, local=5.3.3
composition_interfaces                    : latest=1.2.1, local=1.2.1
ament_cmake_export_interfaces             : latest=1.3.5, local=1.3.5
ros2service                               : latest=0.18.7, local=0.18.6
rosidl_parser                             : latest=3.1.5, local=3.1.4
ament_cmake_export_libraries              : latest=1.3.5, local=1.3.5
launch_testing                            : latest=1.0.4, local=1.0.4
launch_testing_ament_cmake                : latest=1.0.4, local=1.0.4
rclcpp_components                         : latest=16.0.5, local=16.0.4
ament_cmake_cppcheck                      : latest=0.12.7, local=0.12.6
rosidl_runtime_c                          : latest=3.1.5, local=3.1.4
ament_index_python                        : latest=1.4.0, local=1.4.0
trajectory_msgs                           : latest=4.2.3, local=4.2.3
ament_cmake_gen_version_h                 : latest=1.3.5, local=1.3.5
ros2pkg                                   : latest=0.18.7, local=0.18.6
rosidl_generator_cpp                      : latest=3.1.5, local=3.1.4
std_msgs                                  : latest=4.2.3, local=4.2.3
unique_identifier_msgs                    : latest=2.2.1, local=2.2.1
ros2param                                 : latest=0.18.7, local=0.18.6
std_srvs                                  : latest=4.2.3, local=4.2.3
lifecycle_msgs                            : latest=1.2.1, local=1.2.1
launch_yaml                               : latest=1.0.4, local=1.0.4
common_interfaces                         : latest=4.2.3, local=4.2.3
ament_cmake_pytest                        : latest=1.3.5, local=1.3.5
ament_cppcheck                            : latest=0.12.7, local=0.12.6
action_msgs                               : latest=1.2.1, local=1.2.1
rclcpp_action                             : latest=16.0.5, local=16.0.4
domain_coordinator                        : latest=0.10.0, local=0.10.0
ament_cmake_python                        : latest=1.3.5, local=1.3.5
tinyxml2_vendor                           : latest=0.7.5, local=0.7.5
rcl_interfaces                            : latest=1.2.1, local=1.2.1
rclpy                                     : latest=3.3.9, local=3.3.8
ros2doctor                                : latest=0.18.7, local=0.18.6
shape_msgs                                : latest=4.2.3, local=4.2.3
rosidl_typesupport_introspection_c        : latest=3.1.5, local=3.1.4
rosidl_generator_py                       : latest=0.14.4, local=0.14.4
rosidl_adapter                            : latest=3.1.5, local=3.1.4
rcl_action                                : latest=5.3.4, local=5.3.3
fastrtps_cmake_module                     : latest=2.2.1, local=2.2.0
ament_cmake_pep257                        : latest=0.12.7, local=0.12.6
rosidl_cmake                              : latest=3.1.5, local=3.1.4
visualization_msgs                        : latest=4.2.3, local=4.2.3
ament_cmake_ros                           : latest=0.10.0, local=0.10.0
launch_ros                                : latest=0.19.5, local=0.19.4
rcutils                                   : latest=5.1.3, local=5.1.3
rosidl_typesupport_c                      : latest=2.0.1, local=2.0.0
ament_lint_cmake                          : latest=0.12.7, local=0.12.6
launch                                    : latest=1.0.4, local=1.0.4
ament_cmake_xmllint                       : latest=0.12.7, local=0.12.6
ament_cmake_export_targets                : latest=1.3.5, local=1.3.5
ament_cmake_gtest                         : latest=1.3.5, local=1.3.5
rpyutils                                  : latest=0.2.1, local=0.2.1
ament_uncrustify                          : latest=0.12.7, local=0.12.6
ros2topic                                 : latest=0.18.7, local=0.18.6
libyaml_vendor                            : latest=1.2.2, local=1.2.2
rosidl_runtime_py                         : latest=0.9.3, local=0.9.3
python_cmake_module                       : latest=0.10.0, local=0.10.0
ament_cmake_include_directories           : latest=1.3.5, local=1.3.5
launch_testing_ros                        : latest=0.19.5, local=0.19.4
rosidl_typesupport_fastrtps_cpp           : latest=2.2.1, local=2.2.0
rcl                                       : latest=5.3.4, local=5.3.3
ament_cpplint                             : latest=0.12.7, local=0.12.6
ros_core                                  : latest=0.10.0, local=0.10.0
ament_cmake_auto                          : latest=1.3.5, local=1.3.5
ament_cmake_export_link_flags             : latest=1.3.5, local=1.3.5
rmw_fastrtps_shared_cpp                   : latest=6.2.3, local=6.2.2
rosgraph_msgs                             : latest=1.2.1, local=1.2.1
osrf_pycommon                             : latest=2.0.2, local=2.0.2
rmw_implementation                        : latest=2.8.2, local=2.8.2
ros2lifecycle                             : latest=0.18.7, local=0.18.6
ament_lint_auto                           : latest=0.12.7, local=0.12.6
sros2_cmake                               : latest=0.10.4, local=0.10.4
rosidl_default_generators                 : latest=1.2.0, local=1.2.0
sros2                                     : latest=0.10.4, local=0.10.4
ament_index_cpp                           : latest=1.4.0, local=1.4.0
rosidl_typesupport_cpp                    : latest=2.0.1, local=2.0.0
ament_cmake_version                       : latest=1.3.5, local=1.3.5
ament_cmake_gmock                         : latest=1.3.5, local=1.3.5
spdlog_vendor                             : latest=1.3.1, local=1.3.1
rcl_logging_interface                     : latest=2.3.1, local=2.3.1
rclcpp_lifecycle                          : latest=16.0.5, local=16.0.4
ament_cmake_target_dependencies           : latest=1.3.5, local=1.3.5
builtin_interfaces                        : latest=1.2.1, local=1.2.1
ament_cmake_cpplint                       : latest=0.12.7, local=0.12.6
ament_cmake                               : latest=1.3.5, local=1.3.5
ros2interface                             : latest=0.18.7, local=0.18.6
ament_cmake_libraries                     : latest=1.3.5, local=1.3.5
class_loader                              : latest=2.2.0, local=2.2.0
ros2action                                : latest=0.18.7, local=0.18.6
ament_cmake_test                          : latest=1.3.5, local=1.3.5
ros_environment                           : latest=3.2.2, local=3.2.2
rosidl_typesupport_fastrtps_c             : latest=2.2.1, local=2.2.0
ros2cli                                   : latest=0.18.7, local=0.18.6
ament_cmake_lint_cmake                    : latest=0.12.7, local=0.12.6
ros2node                                  : latest=0.18.7, local=0.18.6
ament_cmake_export_definitions            : latest=1.3.5, local=1.3.5
ament_lint                                : latest=0.12.7, local=0.12.6
ros2component                             : latest=0.18.7, local=0.18.6
zstd_vendor                               : latest=0.15.7, local=0.15.6
sqlite3_vendor                            : latest=0.15.7, local=0.15.6
rosbag2_transport                         : latest=0.15.7, local=0.15.6
tf2_tools                                 : latest=0.25.3, local=0.25.2
tf2_sensor_msgs                           : latest=0.25.3, local=0.25.2
message_filters                           : latest=4.3.3, local=4.3.3
tf2_eigen_kdl                             : latest=0.25.3, local=0.25.2
pybind11_vendor                           : latest=2.4.2, local=2.4.2
urdf_parser_plugin                        : latest=2.6.0, local=2.6.0
rosbag2_compression                       : latest=0.15.7, local=0.15.6
tf2_geometry_msgs                         : latest=0.25.3, local=0.25.2
tinyxml_vendor                            : latest=0.8.3, local=0.8.3
eigen3_cmake_module                       : latest=0.1.1, local=0.1.1
rosbag2_storage_default_plugins           : latest=0.15.7, local=0.15.6
tf2_bullet                                : latest=0.25.3, local=0.25.2
shared_queues_vendor                      : latest=0.15.7, local=0.15.6
tf2_msgs                                  : latest=0.25.3, local=0.25.2
tf2_ros                                   : latest=0.25.3, local=0.25.2
rosbag2_storage                           : latest=0.15.7, local=0.15.6
rosbag2_interfaces                        : latest=0.15.7, local=0.15.6
kdl_parser                                : latest=2.6.4, local=2.6.4
rosbag2_cpp                               : latest=0.15.7, local=0.15.6
yaml_cpp_vendor                           : latest=8.0.2, local=8.0.2
urdf                                      : latest=2.6.0, local=2.6.0
ros2bag                                   : latest=0.15.7, local=0.15.6
geometry2                                 : latest=0.25.3, local=0.25.2
tf2                                       : latest=0.25.3, local=0.25.2
tf2_eigen                                 : latest=0.25.3, local=0.25.2
tf2_py                                    : latest=0.25.3, local=0.25.2
orocos_kdl_vendor                         : latest=0.2.5, local=0.2.5
tf2_ros_py                                : latest=0.25.3, local=0.25.2
keyboard_handler                          : latest=0.0.5, local=0.0.5
rosbag2                                   : latest=0.15.7, local=0.15.6
tf2_kdl                                   : latest=0.25.3, local=0.25.2
rosbag2_compression_zstd                  : latest=0.15.7, local=0.15.6
ros_base                                  : latest=0.10.0, local=0.10.0
robot_state_publisher                     : latest=3.0.2, local=3.0.2
rosbag2_py                                : latest=0.15.7, local=0.15.6

   PLATFORM INFORMATION
system           : Linux
platform info    : Linux-5.19.0-50-generic-x86_64-with-glibc2.35
release          : 5.19.0-50-generic
processor        : x86_64

   QOS COMPATIBILITY LIST
compatibility status    : No publisher/subscriber pairs found

   RMW MIDDLEWARE
middleware name    : rmw_fastrtps_cpp

   ROS 2 INFORMATION
distribution name      : humble
distribution type      : ros2
distribution status    : active
release platforms      : {'debian': ['bullseye'], 'rhel': ['8'], 'ubuntu': ['jammy']}

   TOPIC LIST
topic               : none
publisher count     : 0
subscriber count    : 0
mikaelarguedas commented 1 year ago

this looks like a regression of ros2cli in humble and later. It applies also to other verbs like "ros2 topic"

with the foxy docker image (or galactic):

root@c81da55b7f47:/# source /opt/ros/foxy/setup.bash 
root@c81da55b7f47:/# ros2 topic echo <TAB><TAB>
--csv              --no-arr           --qos-depth        --qos-history      --qos-reliability  -f                 /parameter_events  
--full-length      --no-str           --qos-durability   --qos-profile      --truncate-length  -l                 /rosout            

with ros:humble (or iron / rolling):

^Cot@795d4942f348:/# ros2 topic echo ^C

hangs forever and nee to ctrl+C two times

I'd be curious to know if this fails natively as well. Pinging ros2cli maintainers to see if this is a known issue and if this issue should be move there instead: @gbiggs @audrow

mikaelarguedas commented 10 months ago

@jonipol Corresponding tickets and PR are in progress on the upstream repository: https://github.com/ros2/ros2cli/issues/851 https://github.com/ros2/ros2cli/pull/852

I recommend you to subscribe / watch those and check if they solve the issue for you. Once they are released they will automatically make it into the docker images in the following weeks