[Solved] ROSbot XL MicroROS/RTOS error

I recently got a ROSbot XL with the Jetson Nano and have been following the quick start guide to set up the robot. For some reason, the microcontroller on the digital board is not initializing properly with MicroROS (LED2 is flashing red).

I’ve made sure I’m using the correct docker containers and have tried going into them to start up bringup.launch.py or the agent again, but don’t see any topics that I’d expect to come from microROS or the agent. Any help with this would be appreciated!

Hello @Erk42 and welcome to the Husarion Community!

I will definitely ask for the Serial Number of your ROSbot XL.

Have you tried running the system according to the instructions based on Docker / Docker Compose found in our How To Start Tutorial (selecting the appropriate tab for Jetson Nano)?

Best regards
Jan Brzyk

Thanks for the help! The serial number is 9d82c7. I have been following the how to start guide with the Docker and Jetson Nano instructions.

Hello @Erk42

Please describe the exact method of starting the robot (commands entered, files used and their content, etc.)

Best regards
Jan Brzyk

Hey @JanBrzyk.

I’ve been following the ROSbot XL - quick start | Husarion to start up the robot. When the robot is on, I ssh into the robot over husarnet. I go to start the docker containers using docker compose up -d with the compose.yaml file below. Its the original file that was downloaded following the quick-start guide.

# Comments:
#   * This is a temporary solution allowing shared memory communication between host and docker container when
#     using Fast DDS. To be removed when user will be able to change this permission to something else than 0644 
#     (https://github.com/eProsima/Fast-DDS/blob/master/thirdparty/boost/include/boost/interprocess/permissions.hpp#L100) 
#
#  ** If the FASTRTPS_DEFAULT_PROFILES_FILE or CYCLONEDDS_URI envs are defined, then we need to bind mount the volume
#     with the DDS config to the container  
#
# *** Optional envs the ROS user may want to set - we need to pass them to the container

x-common-config:
  &common-config
  restart: unless-stopped
  network_mode: host
  ipc: host
  user: ${DOCKER_UID:-1000}:${DOCKER_GID:-1000} # *
  volumes:
    - /etc/group:/etc/group:ro                  # *
    - /etc/passwd:/etc/passwd:ro                # *
    - /etc/shadow:/etc/shadow:ro                # *
    - /home/husarion/.ros:/home/husarion/.ros   # *
    - ${FASTRTPS_DEFAULT_PROFILES_FILE:-dummy_volume_fastdds}:${FASTRTPS_DEFAULT_PROFILES_FILE:-/dummy_volume_fastdds}:ro  # **
    - ${CYCLONEDDS_PATH:-dummy_volume_cyclonedds}:${CYCLONEDDS_PATH:-/dummy_volume_cyclonedds}:ro                          # **
  environment:
    - RMW_IMPLEMENTATION              # ***
    - FASTRTPS_DEFAULT_PROFILES_FILE  # ***
    - CYCLONEDDS_URI                  # ***
    - ROS_DOMAIN_ID                   # ***

services:

  rosbot-xl:
    image: husarion/rosbot-xl:humble-0.8.2-20230913
    container_name: rosbot-xl
    <<: *common-config
    command: ros2 launch rosbot_xl_bringup bringup.launch.py mecanum:=${MECANUM:-True}

  microros:
    image: husarion/micro-xrce-agent:v2.4.1
    container_name: microros
    <<: *common-config
    environment: #only two envs are valid for micro-xrce-agent
      - FASTRTPS_DEFAULT_PROFILES_FILE            # ***
      - XRCE_DOMAIN_ID_OVERRIDE=${ROS_DOMAIN_ID:-}  # ***
    command: MicroXRCEAgent udp4 --port 8888

volumes:
  dummy_volume_fastdds:
  dummy_volume_cyclonedds:                          

Then I run docker exec -it rosbot-xl bash to get into the ros2 environment and follow the remaining quick-start instructions to control the robot with the teleop_twist_keyboard. None of the microROS topics appear when checking either.

husarion@bot:/ros2_ws$ source /opt/ros/humble/setup.bash 
husarion@bot:/ros2_ws$ source install/setup.bash 
husarion@bot:/ros2_ws$ ros2 topic list
/parameter_events
/rosout
husarion@bot:/ros2_ws$ ros2 daemon stop 
The daemon has been stopped
husarion@bot:/ros2_ws$ ros2 topic list
/diagnostics
/imu_broadcaster/imu
/joint_states
/laser_scan_box_filter/transition_event
/odometry/filtered
/parameter_events
/robot_description
/rosbot_xl_base_controller/odom
/rosout
/scan
/scan_filtered
/set_pose
/tf
/tf_static

I’d initially attempt to run the teleop_twist_keyboard, but the robot doesn’t respond to its commands.

The entire time I go through all of this, LED2 is continuously flashing red. If I try to reflash the microcontroller, I run the command provided in the quick start guide.

docker stop rosbot-xl microros || true && 
docker run --rm -it --privileged \
--mount type=bind,source=/dev/ttyUSBDB,target=/dev/ttyUSBDB \
husarion/rosbot-xl:humble-0.8.2-20230913 \
flash-firmware.py -p /dev/ttyUSBDB
rosbot-xl
microros
stm32flash STM32duino_0.5.1

https://github.com/stm32duino/stm32flash

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Version      : 0x31
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0413 (STM32F40xxx/41xxx)
- RAM        : Up to 128KiB  (12288b reserved by bootloader)
- Flash      : Up to 1024KiB (size first sector: 1x16384)
- Option RAM : 16b
- System RAM : 30KiB
Write to memory
Erasing memory
Wrote and verified address 0x08029ad8 (100.00%) Done.

Done.

I’ve tried hitting the restart button for the microcontroller or using more current docker containers, but LED2 continues to flash and microROS never seems to initialize or make a connection.

Hi @Erk42,

Thank you for all the details - exactly what I needed.

You start your system with the command docker compose up -d in -d mode, i.e. detached. I would like you to run the compose.yaml file without the -d flag and then show the logs from terminal (mainly the logs of the microros container, because there is actually a problem with it).

docker compose up

Additionally, how long do you wait for microros to start? It is possible that currently the launch may take up to several dozen seconds and by then the mircoros topics will not be available.

Best regards
Jan Brzyk

I was able to figure out my issue with microros. My netplan file was improperly configured (thought it was correct) and was preventing microros and the agent from establishing a connection with each other. Thanks for the help with trying to debug this.

This topic was automatically closed after 47 hours. New replies are no longer allowed.