Hey Josh,
First of all, thanks for all these great tutorials! They are helping me loads during my studies and thanks for replying. This is for a school project, so i appreciate all the help i can get.
I get the same error message as Samet_Elmaci in this thread:
Discussion - Changes for running mobile robot on Humble/Jammy - #14 by Samet_Elmaci .
Some information about my setup:
I am using ros2 humble in a docker container. I have the exact same hardware setup as you for ease of following your tutorials. I have forwarded the USB ports on the pi to the container, so i am able to get lidar data and control the motors. Therefore the container setup itself is not likely the issue.
I have cloned the repo for articubot_one (humble branch) and the error happens when i try to run the the launch_robot.launch.py. I have tried various things to fix the issue:
- I can control the motors with miniterm.
- I have your diffdrive_arduino pkg (humble branch).
- I have your serial pkg (newans_ros2 branch).
- I have tried running it both on my dev machine and the rpi.
- Following packages are installed:
- ros-humble-ros2-controllers
- ros-humble-ros2-control
- ros-humble-gazebo-ros2-control (on dev machine)
- ros2 control works when running ‘launch_sim.launch.py’. (I can teleop).
- I have of course rebuild with colcon and sourced the workspace.
- I tried referencing the serial device in the ros2_controller.xacro file both by /dev/ttyUSB0 and with /dev/serial/by-id/{the id i found for the nano}.
- I have changed to both read, write, execute privilege for the serial port.
- User is added to the dialout group
- I have tried something as simple as sudo apt-get update and upgrade.
Things i am going to try:
- I have only wired one of the motors up, so i will connect the other one as well.
- Try foxy instead of humble.
- Install ros directly on the machines instead of docker containers.
Error message:
devuser@pi:/overlay_ws$ ros2 launch articubot_one launch_robot.launch.py
[INFO] [launch]: All log files can be found below /home/devuser/.ros/log/2023-09-26-11-54-50-619436-pi-2661
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [2663]
[INFO] [twist_mux-2]: process started with pid [2665]
[twist_mux-2] [INFO] [1695729293.661287767] [twist_mux]: Topic handler ‘topics.joystick’ subscribed to topic ‘cmd_vel_joy’: timeout = 0.500000s , priority = 100.
[twist_mux-2] [INFO] [1695729293.669544297] [twist_mux]: Topic handler ‘topics.navigation’ subscribed to topic ‘cmd_vel’: timeout = 0.500000s , priority = 10.
[twist_mux-2] [INFO] [1695729293.671005906] [twist_mux]: Topic handler ‘topics.tracker’ subscribed to topic ‘cmd_vel_tracker’: timeout = 0.500000s , priority = 20.
[robot_state_publisher-1] [INFO] [1695729293.707919896] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1695729293.708507536] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1695729293.708640478] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1695729293.708740736] [robot_state_publisher]: got segment camera_link_optical
[robot_state_publisher-1] [INFO] [1695729293.708833883] [robot_state_publisher]: got segment caster_wheel
[robot_state_publisher-1] [INFO] [1695729293.708923104] [robot_state_publisher]: got segment chassis
[robot_state_publisher-1] [INFO] [1695729293.709009436] [robot_state_publisher]: got segment face_link
[robot_state_publisher-1] [INFO] [1695729293.709094694] [robot_state_publisher]: got segment laser_frame
[robot_state_publisher-1] [INFO] [1695729293.709181637] [robot_state_publisher]: got segment left_wheel
[robot_state_publisher-1] [INFO] [1695729293.709267247] [robot_state_publisher]: got segment right_wheel
[INFO] [ros2_control_node-3]: process started with pid [2700]
[INFO] [spawner-4]: process started with pid [2702]
[INFO] [spawner-5]: process started with pid [2704]
[ros2_control_node-3] [INFO] [1695729302.263149623] [resource_manager]: Loading hardware ‘RealRobot’
[ros2_control_node-3] terminate called after throwing an instance of ‘pluginlib::LibraryLoadException’
[ros2_control_node-3] what(): According to the loaded plugin descriptions the class diffdrive_arduino/DiffDriveArduino with base class type hardware_interface::SystemInterface does not exist. Declared types are diffdrive_arduino/DiffDriveArduinoHardware fake_components/GenericSystem mock_components/GenericSystem test_hardware_components/TestSystemCommandModes test_hardware_components/TestTwoJointSystem test_system
[ros2_control_node-3] Stack trace (most recent call last):
[ros2_control_node-3] #16 Object “/usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1”, at 0xffffffffffffffff, in
[ros2_control_node-3] #15 Object “/opt/ros/humble/lib/controller_manager/ros2_control_node”, at 0xaaaae2d52c6f, in
[ros2_control_node-3] #14 Object “/usr/lib/aarch64-linux-gnu/libc.so.6”, at 0xffffa63274cb, in __libc_start_main
[ros2_control_node-3] #13 Object “/usr/lib/aarch64-linux-gnu/libc.so.6”, at 0xffffa63273fb, in
[ros2_control_node-3] #12 Object “/opt/ros/humble/lib/controller_manager/ros2_control_node”, at 0xaaaae2d52767, in
[ros2_control_node-3] #11 Object “/opt/ros/humble/lib/libcontroller_manager.so”, at 0xffffa699cba7, in controller_manager::ControllerManager::ControllerManager(std::shared_ptrrclcpp::Executor, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, rclcpp::NodeOptions const&)
[ros2_control_node-3] #10 Object “/opt/ros/humble/lib/libcontroller_manager.so”, at 0xffffa699bfcf, in controller_manager::ControllerManager::init_resource_manager(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
[ros2_control_node-3] #9 Object “/opt/ros/humble/lib/libhardware_interface.so”, at 0xffffa6197237, in hardware_interface::ResourceManager::load_urdf(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)
[ros2_control_node-3] #8 Object “/opt/ros/humble/lib/libhardware_interface.so”, at 0xffffa61959e3, in
[ros2_control_node-3] #7 Object “/opt/ros/humble/lib/libhardware_interface.so”, at 0xffffa61a16b7, in
[ros2_control_node-3] #6 Object “/usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30”, at 0xffffa6582e03, in __cxa_throw
[ros2_control_node-3] #5 Object “/usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30”, at 0xffffa6582b1f, in std::terminate()
[ros2_control_node-3] #4 Object “/usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30”, at 0xffffa6582abb, in
[ros2_control_node-3] #3 Object “/usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30”, at 0xffffa65862db, in __gnu_cxx::__verbose_terminate_handler()
[ros2_control_node-3] #2 Object “/usr/lib/aarch64-linux-gnu/libc.so.6”, at 0xffffa632712f, in abort
[ros2_control_node-3] #1 Object “/usr/lib/aarch64-linux-gnu/libc.so.6”, at 0xffffa633a67b, in raise
[ros2_control_node-3] #0 Object “/usr/lib/aarch64-linux-gnu/libc.so.6”, at 0xffffa637f200, in
[ros2_control_node-3] Aborted (Signal sent by tkill() 2700 1000)
[ERROR] [ros2_control_node-3]: process has died [pid 2700, exit code -6, cmd ‘/opt/ros/humble/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_navrtmcw --params-file /overlay_ws/install/articubot_one/share/articubot_one/config/my_controllers.yaml’].
[spawner-4] [INFO] [1695729307.338964270] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1695729307.421576180] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [INFO] [1695729309.405147189] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1695729309.489268521] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [INFO] [1695729311.472865011] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1695729311.556779495] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [INFO] [1695729313.543320664] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1695729313.625254842] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [ERROR] [1695729315.200286903] [spawner_joint_broad]: Controller manager not available
[spawner-5] [ERROR] [1695729315.279275328] [spawner_diff_cont]: Controller manager not available
[ERROR] [spawner-4]: process has died [pid 2702, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner joint_broad --ros-args’].
[ERROR] [spawner-5]: process has died [pid 2704, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner diff_cont --ros-args’].