Issue with micro-ROS Communication Between Jetson AGX Orin and ESP32 – Stuck After "Session Established"

Hello,

I am trying to establish communication between a Jetson AGX Orin and an ESP32 using micro-ROS. Here’s the setup and the issue I’m facing:

Setup

Jetson AGX Orin: Running inside a container with ROS 2 Humble and micro-ROS built from source. I start the micro-ROS agent with the following command:

ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyCH341USB0

Logs from the agent:

[1740930411.679304] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
[1740930411.680026] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[1740930425.682396] info     | Root.cpp           | create_client            | create                 | client_key: 0x7D248957, session_id: 0x81
[1740930425.682552] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x7D248957, address: 0

ESP32: Running the micro-ros_publisher sample code from the micro_ros_arduino library as the firmware.

The agent initializes, creates a client, and establishes a session, but it doesn’t proceed beyond this point. No communication occurs with the ESP32.

I’ve tested the same ESP32 setup with a laptop running ROS 2 Humble and micro-ROS, and communication works perfectly fine there.

The Jetson AGX Orin is connected to the ESP32 via a USB-to-serial adapter (/dev/ttyCH341USB0).

Problem

Inside the Jetson container, after the “session established” log, there’s no further progress—no topics are published, and the ESP32 doesn’t seem to communicate with the agent. I suspect there might be an issue with the container setup, serial port configuration, or something specific to Jetson AGX Orin.

Request

If anyone has experience with micro-ROS on Jetson AGX Orin or has encountered a similar issue, I’d greatly appreciate any advice or suggestions.

Thank you in advance for your help!

Hi,
We don’t have much experience about the setup and it would need other users to share experience. Found a webpage which is related:
https://www.einfochips.com/blog/control-your-robot-using-micro-ros-and-nvidia-jetson-kit/

You may consult with them to get further suggestion.

Sorry, it turns out the issue was that the CH341 driver installation for the AGX Orin wasn’t working properly.
After reinstalling the CH341 driver, I was able to communicate with an ESP32 using microROS inside a Jetson container on the AGX Orin. Below are the detailed steps.

The CH340 serial driver for the ESP32 is not included in the JetPack 6.x kernel, so it needs to be installed manually. Here’s how:

git clone https://github.com/juliagoda/CH341SER.git
cd CH341SER
make
sudo make install
sudo insmod ./ch34x.ko

To make it persistent, add it to the kernel:

sudo cp ch34x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/
sudo depmod -a
sudo bash -c 'echo "ch34x" >> /etc/modules'

If you still can’t see /dev/ttyUSB0 even after installing the driver, you may need to remove brltty:

sudo apt remove brltty

Start the Docker container:

jetson-containers run --device=/dev/ttyUSB0:/dev/ttyUSB0   $(your docker image)

Inside the Docker container, you need to set up the environment for ROS 2 and the micro_ros_agent.
After setting up the environment, run:

ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyUSB0

This allows communication with the ESP32.
With the above method, you can successfully communicate between a Jetson Orin Docker image and microROS.

Thank you for your support.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.