Discussion - Changes for running mobile robot on Humble/Jammy

After a couple weeks, no answers to install and run Gazebo Garden and associated gazebosim/ros_gz install and run from the community . But I was able to get a procedure from the leader of a Meetup forum I regularly call into [ROS 2 to Nav2 with a dash of Simulation)] (Artificial Intelligence and Machine Learning for Robotics (Houston, TX) | Meetup). On a Ubuntu 22.04/ROS 2 Humble system , best to remove any existing gz-garden, ignition-fortress, or ros_gz previously installed by the ROS 2 Desktop Installation, and install a clean Gazebo Fortress from the available Binaries and follow tutorials here: Gazebo Fortress Getting Started . Install Fortress . Load ros_gz: $ source /opt/ros/humble/setup.sh , sudo apt install https://sudo apt-get install ros-humble-ros-gz) . Try running thru the steps Setting up a Robot Simulator . This starts up ign gazebo GUI, configures ROS 2 and teleop, Visualizes lidar data in ROS 2 with the ros_gz_bridge . I have not yet run the diffdrive template example

1 Like

hi josh thx for your effort !!

i need your help i rly tried everything but slowly im starting banging my head against the wall haha so my problem is that im not able to launch the cam via V4L2 node its launching everything until “starting the camera”(i will post my traceback) but its not able to find the calibration file so when i launch the rqt viewer it shows me no image!

im using a pi4 with ubuntu mate 22.04 version and ros humble there is no raspistill and no libcamera i tried everything reinstalling all but still nothing happening!

all my codes in terminal when i launch them!

**vcgencmd get_camera**
supported=1 detected=1, libcamera interfaces=0
**libcamera-hello**
libcamera-hello: command not found
**when i launch the v4l2 node with your code line for humble!!**

[INFO] [1685308312.016667854] [v4l2_camera]: Driver: bm2835 mmal
[INFO] [1685308312.017127366] [v4l2_camera]: Version: 331618
[INFO] [1685308312.017204633] [v4l2_camera]: Device: mmal service 16.1
[INFO] [1685308312.017255898] [v4l2_camera]: Location: platform:bcm2835-v4l2-0
[INFO] [1685308312.017306847] [v4l2_camera]: Capabilities:
[INFO] [1685308312.017353852] [v4l2_camera]:   Read/write: YES
[INFO] [1685308312.017401506] [v4l2_camera]:   Streaming: YES
[INFO] [1685308312.017468031] [v4l2_camera]: Current pixel format: YUYV @ 640x480
[INFO] [1685308312.018461025] [v4l2_camera]: Available pixel formats: 
[INFO] [1685308312.018520142] [v4l2_camera]:   YU12 - Planar YUV 4:2:0
[INFO] [1685308312.018569925] [v4l2_camera]:   YUYV - YUYV 4:2:2
[INFO] [1685308312.018618208] [v4l2_camera]:   RGB3 - 24-bit RGB 8-8-8
[INFO] [1685308312.018663639] [v4l2_camera]:   JPEG - JFIF JPEG
[INFO] [1685308312.018708496] [v4l2_camera]:   H264 - H.264
[INFO] [1685308312.018755223] [v4l2_camera]:   MJPG - Motion-JPEG
[INFO] [1685308312.018801876] [v4l2_camera]:   YVYU - YVYU 4:2:2
[INFO] [1685308312.018845992] [v4l2_camera]:   VYUY - VYUY 4:2:2
[INFO] [1685308312.018890052] [v4l2_camera]:   UYVY - UYVY 4:2:2
[INFO] [1685308312.018934075] [v4l2_camera]:   NV12 - Y/CbCr 4:2:0
[INFO] [1685308312.018978006] [v4l2_camera]:   BGR3 - 24-bit BGR 8-8-8
[INFO] [1685308312.019021955] [v4l2_camera]:   YV12 - Planar YVU 4:2:0
[INFO] [1685308312.019065774] [v4l2_camera]:   NV21 - Y/CrCb 4:2:0
[INFO] [1685308312.019109834] [v4l2_camera]:   RX24 - 32-bit XBGR 8-8-8-8
[INFO] [1685308312.019156487] [v4l2_camera]: Available controls: 
[INFO] [1685308312.019217068] [v4l2_camera]:   Brightness (1) = 50
[INFO] [1685308312.019276222] [v4l2_camera]:   Contrast (1) = 0
[INFO] [1685308312.019333599] [v4l2_camera]:   Saturation (1) = 0
[INFO] [1685308312.019394827] [v4l2_camera]:   Red Balance (1) = 1000
[INFO] [1685308312.019452259] [v4l2_camera]:   Blue Balance (1) = 1000
[INFO] [1685308312.019506635] [v4l2_camera]:   Horizontal Flip (2) = 0
[INFO] [1685308312.019562993] [v4l2_camera]:   Vertical Flip (2) = 0
[INFO] [1685308312.019616980] [v4l2_camera]:   Power Line Frequency (3) = 1
[INFO] [1685308312.019670912] [v4l2_camera]:   Sharpness (1) = 0
[INFO] [1685308312.019726177] [v4l2_camera]:   Color Effects (3) = 0
[INFO] [1685308312.019780683] [v4l2_camera]:   Rotate (1) = 0
[INFO] [1685308312.019840671] [v4l2_camera]:   Color Effects, CbCr (1) = 32896
[ERROR] [1685308312.019909919] [v4l2_camera]: Failed getting value for control 10027009: Permission denied (13); returning 0!
[INFO] [1685308312.019962776] [v4l2_camera]:   Codec Controls (6) = 0
[INFO] [1685308312.020020708] [v4l2_camera]:   Video Bitrate Mode (3) = 0
[INFO] [1685308312.020078529] [v4l2_camera]:   Video Bitrate (1) = 10000000
[INFO] [1685308312.020134368] [v4l2_camera]:   Repeat Sequence Header (2) = 0
[ERROR] [1685308312.020191430] [v4l2_camera]: Failed getting value for control 10029541: Permission denied (13); returning 0!
[INFO] [1685308312.020240843] [v4l2_camera]:   Force Key Frame (4) = 0
[INFO] [1685308312.020331982] [v4l2_camera]:   H264 Minimum QP Value (1) = 0
[INFO] [1685308312.020415213] [v4l2_camera]:   H264 Maximum QP Value (1) = 0
[INFO] [1685308312.020476219] [v4l2_camera]:   H264 I-Frame Period (1) = 60
[INFO] [1685308312.020535466] [v4l2_camera]:   H264 Level (3) = 11
[INFO] [1685308312.020591676] [v4l2_camera]:   H264 Profile (3) = 4
[ERROR] [1685308312.020647052] [v4l2_camera]: Failed getting value for control 10092545: Permission denied (13); returning 0!
[INFO] [1685308312.020695743] [v4l2_camera]:   Camera Controls (6) = 0
[INFO] [1685308312.020751711] [v4l2_camera]:   Auto Exposure (3) = 0
[INFO] [1685308312.020808217] [v4l2_camera]:   Exposure Time, Absolute (1) = 1000
[INFO] [1685308312.020864186] [v4l2_camera]:   Exposure, Dynamic Framerate (2) = 0
[INFO] [1685308312.020918933] [v4l2_camera]:   Auto Exposure, Bias (9) = 12
[INFO] [1685308312.020974124] [v4l2_camera]:   White Balance, Auto & Preset (3) = 1
[INFO] [1685308312.021028667] [v4l2_camera]:   Image Stabilization (2) = 0
[INFO] [1685308312.021195962] [v4l2_camera]:   ISO Sensitivity (9) = 0
[INFO] [1685308312.021268822] [v4l2_camera]:   ISO Sensitivity, Auto (3) = 1
[INFO] [1685308312.021333199] [v4l2_camera]:   Exposure, Metering Mode (3) = 0
[INFO] [1685308312.021393742] [v4l2_camera]:   Scene Mode (3) = 0
[ERROR] [1685308312.021457842] [v4l2_camera]: Failed getting value for control 10289153: Permission denied (13); returning 0!
[INFO] [1685308312.021509088] [v4l2_camera]:   JPEG Compression Controls (6) = 0
[INFO] [1685308312.021569094] [v4l2_camera]:   Compression Quality (1) = 30
[WARN] [1685308312.024481365] [v4l2_camera]: Control type not currently supported: 6, for control: Codec Controls
[WARN] [1685308312.024844385] [v4l2_camera]: Control type not currently supported: 4, for control: Force Key Frame
[WARN] [1685308312.025328714] [v4l2_camera]: Control type not currently supported: 6, for control: Camera Controls
[WARN] [1685308312.025656767] [v4l2_camera]: Control type not currently supported: 9, for control: Auto Exposure, Bias
[WARN] [1685308312.025929314] [v4l2_camera]: Control type not currently supported: 9, for control: ISO Sensitivity
[WARN] [1685308312.026256978] [v4l2_camera]: Control type not currently supported: 6, for control: JPEG Compression Controls
[INFO] [1685308312.026435330] [v4l2_camera]: Starting camera
**sudo apt update**
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://ports.ubuntu.com jammy InRelease                                  
Get:3 http://ports.ubuntu.com jammy-updates InRelease [119 kB]                 
Hit:4 https://packages.microsoft.com/repos/code stable InRelease               
Get:5 http://ports.ubuntu.com jammy-security InRelease [110 kB]                
Hit:6 http://ports.ubuntu.com jammy-backports InRelease        
Hit:7 http://packages.ros.org/ros2/ubuntu jammy InRelease
Fetched 229 kB in 3s (72.8 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

That output frp, v4l2_camera actually seems normal to me! Not having the calibration is ok, it should still publish the image topic, but I think if you use a “Camera” view in RViz it won’t work as it can’t project the image into 3D space.

So just confirming, you run the driver and then run rqt_image_view - do the topics not show up? Or do they show up but you can’t get data on them?

Yes the topics show up all of them but I get no image only grey black :confused:

Josh, Following up on my previous dialog on Gazebo Sim, with the collaboration of other experimenters I’m communication with, we made some progress in defining how to migrate Classic Gazebo functions to an equivalent in Gazebo Sim. Its tutorials Robot simulation (Gazebo) walk the user though to display Gazebo Simulations using built in “canned” models, but no apparent way to use these packages and scripts with existing Robot Models. We realized the key to displaying existing Robots described by xacro and urdf files in the current gazebo sim, namely Gazebo Fortress (NOT Garden which doesn’t play well in Humble) in simulation is in the packages under gazebosim/ros_gz, specifically : ros_gz_sim_demos .The launch file “joint_states.launch.py” that spawns a Node that contains a robot .xacro and robot_description. So we feel that this launch file, with suitable specific revisions, in a Classic Simulation project would replace the code launched for a Robot Simulation coded in the Classic ros2 gazebo_ros gazebo.launch.py and ros2 run gazebo_ros spawn_untity.py files. That said there is some tricky bits required to install Gazebo Sim Fortress and get it running in a ROS Humble System. We are working out the details and should be able to post something, hopefully “soon” . Ross

Hi ı have a issue when ı launch launch_robot.launch.py

ros2 launch articubot_one launch_robot.launch.py 
[INFO] [launch]: All log files can be found below /home/samet/.ros/log/2023-06-14-22-30-20-346455-baba-41858
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [41860]
[INFO] [twist_mux-2]: process started with pid [41862]
[twist_mux-2] [INFO] [1686771020.580608893] [twist_mux]: Topic handler 'topics.joystick' subscribed to topic 'cmd_vel_joy': timeout = 0.500000s , priority = 100.
[twist_mux-2] [INFO] [1686771020.581419100] [twist_mux]: Topic handler 'topics.navigation' subscribed to topic 'cmd_vel': timeout = 0.500000s , priority = 10.
[twist_mux-2] [INFO] [1686771020.581566010] [twist_mux]: Topic handler 'topics.tracker' subscribed to topic 'cmd_vel_tracker': timeout = 0.500000s , priority = 20.
[robot_state_publisher-1] Link base_footprint had 0 children
[robot_state_publisher-1] Link chassis had 4 children
[robot_state_publisher-1] Link camera_link had 1 children
[robot_state_publisher-1] Link camera_link_optical had 0 children
[robot_state_publisher-1] Link caster_wheel had 0 children
[robot_state_publisher-1] Link face_link had 0 children
[robot_state_publisher-1] Link laser_frame had 0 children
[robot_state_publisher-1] Link left_wheel had 0 children
[robot_state_publisher-1] Link right_wheel had 0 children
[robot_state_publisher-1] [INFO] [1686771020.583632609] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1686771020.583688386] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1686771020.583694082] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1686771020.583698036] [robot_state_publisher]: got segment camera_link_optical
[robot_state_publisher-1] [INFO] [1686771020.583703522] [robot_state_publisher]: got segment caster_wheel
[robot_state_publisher-1] [INFO] [1686771020.583707576] [robot_state_publisher]: got segment chassis
[robot_state_publisher-1] [INFO] [1686771020.583711910] [robot_state_publisher]: got segment face_link
[robot_state_publisher-1] [INFO] [1686771020.583716004] [robot_state_publisher]: got segment laser_frame
[robot_state_publisher-1] [INFO] [1686771020.583719348] [robot_state_publisher]: got segment left_wheel
[robot_state_publisher-1] [INFO] [1686771020.583722441] [robot_state_publisher]: got segment right_wheel
[INFO] [ros2_control_node-3]: process started with pid [41895]
[INFO] [spawner-4]: process started with pid [41897]
[INFO] [spawner-5]: process started with pid [41899]
[ros2_control_node-3] [INFO] [1686771024.527552570] [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 "", at 0xffffffffffffffff, in 
[ros2_control_node-3] #15   Object "/opt/ros/humble/lib/controller_manager/ros2_control_node", at 0x5621edd2bd84, in 
[ros2_control_node-3] #14   Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7fee30a29e3f]
[ros2_control_node-3] #13   Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7fee30a29d8f]
[ros2_control_node-3] #12   Object "/opt/ros/humble/lib/controller_manager/ros2_control_node", at 0x5621edd2b89e, in 
[ros2_control_node-3] #11   Object "/opt/ros/humble/lib/libcontroller_manager.so", at 0x7fee313e2171, in controller_manager::ControllerManager::ControllerManager(std::shared_ptr<rclcpp::Executor>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::NodeOptions const&)
[ros2_control_node-3] #10   Object "/opt/ros/humble/lib/libcontroller_manager.so", at 0x7fee313e1257, in controller_manager::ControllerManager::init_resource_manager(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[ros2_control_node-3] #9    Object "/opt/ros/humble/lib/libhardware_interface.so", at 0x7fee31085207, in hardware_interface::ResourceManager::load_urdf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
[ros2_control_node-3] #8    Object "/opt/ros/humble/lib/libhardware_interface.so", at 0x7fee3108d856, in 
[ros2_control_node-3] #7    Object "/opt/ros/humble/lib/libhardware_interface.so", at 0x7fee31064858, in 
[ros2_control_node-3] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fee30eae517, in __cxa_throw
[ros2_control_node-3] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fee30eae2b6, in std::terminate()
[ros2_control_node-3] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fee30eae24b, in 
[ros2_control_node-3] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fee30ea2bbd, in 
[ros2_control_node-3] #2    Source "./stdlib/abort.c", line 79, in abort [0x7fee30a287f2]
[ros2_control_node-3] #1    Source "../sysdeps/posix/raise.c", line 26, in raise [0x7fee30a42475]
[ros2_control_node-3] #0  | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
[ros2_control_node-3]     | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
[ros2_control_node-3]       Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7fee30a96a7c]
[ros2_control_node-3] Aborted (Signal sent by tkill() 41895 1000)
[ERROR] [ros2_control_node-3]: process has died [pid 41895, exit code -6, cmd '/opt/ros/humble/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_u5sstrjv --params-file /home/samet/develop/articubot_ws/install/articubot_one/share/articubot_one/config/my_controllers.yaml'].
[spawner-4] [INFO] [1686771026.749255351] [spawner_joint_broad]: Waiting for '/controller_manager' node to exist
[spawner-5] [INFO] [1686771026.749354926] [spawner_diff_cont]: Waiting for '/controller_manager' node to exist
[spawner-5] [INFO] [1686771028.764966284] [spawner_diff_cont]: Waiting for '/controller_manager' node to exist
[spawner-4] [INFO] [1686771028.765053858] [spawner_joint_broad]: Waiting for '/controller_manager' node to exist
[spawner-5] [INFO] [1686771030.779927911] [spawner_diff_cont]: Waiting for '/controller_manager' node to exist
[spawner-4] [INFO] [1686771030.780130658] [spawner_joint_broad]: Waiting for '/controller_manager' node to exist
[spawner-4] [INFO] [1686771032.794488801] [spawner_joint_broad]: Waiting for '/controller_manager' node to exist
[spawner-5] [INFO] [1686771032.794564345] [spawner_diff_cont]: Waiting for '/controller_manager' node to exist
[spawner-4] [ERROR] [1686771034.807470987] [spawner_joint_broad]: Controller manager not available
[spawner-5] [ERROR] [1686771034.807470927] [spawner_diff_cont]: Controller manager not available
[ERROR] [spawner-5]: process has died [pid 41899, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner diff_cont --ros-args'].
[ERROR] [spawner-4]: process has died [pid 41897, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner joint_broad --ros-args'].
1 Like

Hi Josh and thanks for your support!!

I have a issue, I don’t know if it would be a problem.
I’ve changed my project to humble, but when I run my robot and launch slam toolbox or rviz, it drop a meesage: Message Filter dropping message: frame ‘laser_frame’ at time 1687033337.929 for reason ‘discarding message because the queue is full’.

iam using ros2 humble from initial of the mobile robot tutorial. when i try to spawn robot in gazebo it is not spawn in the gazebo simulator now what can i do?

Bro, I have the same issue.

Could you solve it? I am using an arduino uno

I just found the solution.

1)Change de “device param” at your_package_path/description/ros2_control to /dev/seraial/by-id/$(yourpathtoarduinodevice)
2) go to your ws_path
3) colcon build --symlink-install

It worked for me.

Hey Adrian!

I have the same issue. How do i find the path by-id? And is your device actually located under the folder /dev/serial/ ? All my serial connections are listed under /dev

Never mind, i have my arduino nano in the directory you mentioned, but it does not work for me :confused:

When you say does not work, what doesn’t work?

For those interested. I accidentally posted my answer on the wrong thread:

Hi,

I have the same issue
posted here Discussion - Running ros2_control on a real robot (Making a Mobile Robot Pt 13) - #77 by Mikhail_Andryievich
also change device to /dev/seraial/by-id/$(yourpathtoarduinodevice) didn’t help.

Hi,
Issue solved,

Please see my post Discussion - Running ros2_control on a real robot (Making a Mobile Robot Pt 13) - #78 by Mikhail_Andryievich

1 Like

I keep getting a controller manger error on my real robot , [spawner-4] [INFO] [1697218098.682967899] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1697218098.687145515] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [INFO] [1697218100.745289152] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1697218100.747771286] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [INFO] [1697218102.808255262] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1697218102.810942465] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [INFO] [1697218104.871516344] [spawner_joint_broad]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1697218104.872617710] [spawner_diff_cont]: Waiting for ‘/controller_manager’ node to exist
[spawner-4] [ERROR] [1697218106.728414678] [spawner_joint_broad]: Controller manager not available
[spawner-5] [ERROR] [1697218106.728412641] [spawner_diff_cont]: Controller manager not available
[ERROR] [spawner-5]: process has died [pid 6013, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner diff_cont --ros-args’].
[ERROR] [spawner-4]: process has died [pid 6011, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner joint_broad --ros-args’].

I’m using ROS2 Humble on 22.04 and I’m getting the following errors when trying to use the ‘serial_motor_demo’ nodes on both my PI and Dev box.
Any help would be welcome!
Here are the errors:

~/dev_ws$ colcon build --symlink-install
Starting >>> serial_motor_demo_msgs
Starting >>> articubot_one
Starting >>> joy_tester
Starting >>> my_bot                                                                                         
Finished <<< articubot_one [0.56s]                                                                                                                   
Finished <<< my_bot [0.60s]                                                                                          
Finished <<< serial_motor_demo_msgs [0.83s]                                                  
Starting >>> serial_motor_demo
/home/robert/.local/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'script-dir' will not be supported in future versions. Please use the underscore name 'script_dir' instead
  warnings.warn(
/home/robert/.local/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'install-scripts' will not be supported in future versions. Please use the underscore name 'install_scripts' instead
  warnings.warn(
Finished <<< joy_tester [1.14s]                                                 
--- stderr: serial_motor_demo                   
/home/robert/.local/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'script-dir' will not be supported in future versions. Please use the underscore name 'script_dir' instead
  warnings.warn(
---
Finished <<< serial_motor_demo [0.99s]

Summary: 5 packages finished [2.56s]
  1 package had stderr output: serial_motor_demo

source install/setup.bash
~/dev_ws$ ros2 run serial_motor_demo driver --ros-args -p serial_port:=/dev/ttyUSB0 -p baud_rate:=115200 -p loop_rate:=30 -p encoder_cpr:=403 

Traceback (most recent call last):
  File "/home/robert/dev_ws/install/serial_motor_demo/lib/serial_motor_demo/driver", line 33, in <module>
    sys.exit(load_entry_point('serial-motor-demo', 'console_scripts', 'driver')())
  File "/home/robert/dev_ws/install/serial_motor_demo/lib/serial_motor_demo/driver", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/robert/dev_ws/build/serial_motor_demo/serial_motor_demo/driver.py", line 8, in <module>
    import serial
ModuleNotFoundError: No module named 'serial'
[ros2run]: Process exited with failure 1
~/dev_ws$

I found the issue:
go to ~/dev_ws/src/serial_motor_demo/serial_motor_demo/setup.cfg and change script-dir to script_dir and install-scripts to install_scripts

To fix the other issues:
sudo apt update
pip install pyserial

colcon build --symlink-install
source install/setup.bash

This worked for me.

1 Like

[ERROR] [spawner-9]: process has died [pid 130035, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner joint_broad --ros-args’].
[ERROR] [spawner-8]: process has died [pid 130033, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner diff_cont --ros-args’].
suggest any solutions