micro-ROS / micro-ROS/micro_ros_arduino
docker was connected to the ESP32 by serial port, but no client created and no node was found
- Dominant language
- C
- Stars
- 576
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
- Linux systerm:Ubuntu with ros2 humble
- esp32 with micro-ros
- esp32 was programmed on:platformio
- agent:docker(after this I installed micro_ros_setup package it didn't work as well)
#### Steps to reproduce the issue
**Destination:** Esp32 publishs node, and the host computer installed with ros2 through docker can find it by serial port communication.
**esp32 code:**
``` C++
#include
#include
#include
#include
#include
rclc_executor_t executor;
rclc_support_t support;
rcl_allocator_t allocator;
rcl_node_t node;
void setup()
{
Serial.begin(115200);
// 设置通过串口进行MicroROS通信
set_microros_serial_transports(Serial);
// 延时时一段时间,等待设置完成
delay(2000);
// 初始化内存分配器
allocator = rcl_get_default_allocator();
// 创建初始化选项
rclc_support_init(&support, 0, NULL, &allocator);
// 创建节点 hello_microros
rclc_node_init_default(&node, "hello_microros", "", &support);
// 创建执行器
rclc_executor_init(&executor, &support.context, 1, &allocator);
}
void loop()
{
delay(100);
// 循环处理数据
rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100));
}
```
**Terminal:**
``` go
sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO serial --dev /dev/ttyUSB0 -v6
```
---
#### Expected behavior


#### Actual behavior

#### Additional information
Although docker recognized the micro-ros device, it was stuck in the logger set-up did not create client,and it is useless to press the RST key,not to mention node information is missing.
Contributor guide
Research direction
Start by reproducing the PlatformIO ESP32 sketch with the provided Docker agent command and inspect the `-v6` serial-agent output. Check the `set_microros_serial_transports(Serial)` setup and the connection between `/dev/ttyUSB0` and the container. Done means the agent creates a client and the `hello_microros` node becomes visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, docker, ubuntu
- Domain
- devops, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100