micro-ROS / micro-ROS-Agent

ROS 2 package using Micro XRCE-DDS Agent.
Apache License 2.0
104 stars 63 forks source link

port dosen't appear with snap interface #87

Closed alhaddad-m closed 2 years ago

alhaddad-m commented 3 years ago

I am new to micro-ros and trying to communicate with Rasbperry Pi Pico using micro-ros-agent but when i execute snap interface serial-port I see the following output

name:    serial-port
summary: allows accessing a specific serial port
plugs:
  - arduino
  - micro-ros-agent

and It doesn't show any port. And when i run micro-ros-agent serial --dev /dev/ttyACM0 -b 115200 it shows:

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[1626044708.103592] error    | TermiosAgentLinux.cpp | init                     | open device error      | device: /dev/ttyACM0, errno: 13. Please re-run with superuser privileges.
Error while starting serial agent!
Segmentation fault (core dumped)

Any suggestion please!

pablogs9 commented 3 years ago

Currently, the micro-ROS snap package is not working properly, we are working on a solution. Is it possible for you to build the agent from scratch with the setup tool: micro_ros_setup?

alhaddad-m commented 3 years ago

@pablogs9 I have already tried micro_ros_setup and when i run ros2 run micro_ros_setup create_firmware_ws.sh freertos olimex-stm32-e407 i have gotten some errors.

Actually i don't know if this is connecting to my problem above. Also i have tried docker to communicate and it works well.

pablogs9 commented 3 years ago

Have you run it with sudo as the errors message says?

Please re-run with superuser privileges.?

alhaddad-m commented 3 years ago

I have tried it with sudo and the error message was something like colcon finished with stlerr. . After that i have deleted all uros_ws and didn't complete ahead.

pablogs9 commented 3 years ago

Could you be more specific and paste here your output with sudo in the agent launch?