Open djaniel opened 1 year ago
how are you running the dockers where you run ros2 node list
?
on my development pc I am using
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v4
Then I get an interactive bash using:
docker exec -it [name of the image] bash
From there I can run the ros2 commands to verify the node and the topic.
I am thinking. Would it have to do with the domain id ?
Are you changing the domain id in the micro-ROS client?
No I am not setting the domain id on my RP2040. However, I did it on the embedded computer, where I run micro_ros_agent. In my head, the domain id that matters is the one of the execution environment of the micro_ros_agent. Am I wrong?
The micro-ROS agent does not modify the domain id. Is the client who determines which domain id will use.
Could you check if setting your ROS 2 environment to domains id 0 it works?
Thank for your answer. I was wrong. Using uRos for Humble, I changed the domain id using the following:
size_t domain_id = ; //Define init options rcl_init_options_t init_options = rcl_get_zero_initialized_init_options();
RCCHECK(rcl_init_options_init(&init_options, allocator)); rmw_init_options_t* rmw_options = rcl_init_options_get_rmw_init_options(&init_options);
RCCHECK(rcl_init_options_set_domain_id(&init_options, domain_id));
After programming the board, I don't see anymore my node on the container and luckily it works fine on my RPI. Thank you.
Hello again,
I am running uROS on a RP2040 connect. As usual, for testing I am using docker which launches the micro ros agent in humble:
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v4
Everything works fine on my pc. When I go open a new bash on the image I can display the uros node and topic. I can display the contents of the message.
Then I connected my RP2040 to an embedded computer with Ubuntu server 22, Ros2 Humble. The problem is that the launch process seems to go well, I set -v5 and I see a lot of :
But unfortunately and after launching the uros agent, the commands for listing the topics and the nodes do not display anything.
$ros2 node list $ros2 topic list /parameter_events /rosout
Any suggestions would be greatly appreciated.