inav icon indicating copy to clipboard operation
inav copied to clipboard

Add micro-ros telemetry support(ros2)

Open amfern opened this issue 4 years ago • 5 comments

This PR is a POC of micro ros running on inav, basically allows direct communication with ROS2 network over serial. Currently i implemented only one publisher as an example, to test it you can attach serial rs232 and set microros(33554432) telemetry on it

serial 2 33554432 115200 115200 115200 115200

run the micro ros agent, (change the serial device location, mine is at dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0):

docker run --init -it --rm -v /dev:/dev --privileged microros/micro-ros-agent:foxy serial --dev /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -b 115200 -v6

echo the dds talker:

docker run -ti --rm ros:foxy ros2 topic echo talker
data: biau
---
data: biau
---
data: biau
---
data: biau
---
data: biau

This is achived by adding the micro ros static library as a git submodules dependency, this is a fork of micro ros library because i needed to apply some tweaks to it.

amfern avatar Jun 01 '21 23:06 amfern

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help. This issue / pull request will be closed if no further activity occurs within two weeks.

stale[bot] avatar Jan 09 '22 01:01 stale[bot]

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help. This issue / pull request will be closed if no further activity occurs within two weeks.

stale[bot] avatar Apr 18 '22 18:04 stale[bot]

@DzikuVx Hi, what do you think about this PR, is it mergeable?

amfern avatar Apr 18 '22 21:04 amfern

@amfern First I'd like to understand why we need another protocol over here? INAV has MSP which has everything in terms of telemetry and settings. It feels more natural for clients to use MSP to communicate with INAV than the other way around

DzikuVx avatar Apr 19 '22 09:04 DzikuVx

@DzikuVx My intention was to connect ROS 2 to INav. microros enables Seamless integration with ROS 2, Essentially turning INav into a Ros2 node

  • ROS 2 messages defined in IDL language, so adding new message is effortless because there is no need to write serialize and deserialize, and also less error-prone.
  • microros already implements an agent which acts as a proxy, so no need to write one in MSP
  • microros can implement pub sub, ros2 actions, ros2 configuration, directly from INav, It would require alot of effort to translate the ros2 communication primitives to MSP
  • INav can communicate directly with other DDS providers because ROS2 uses DDS underneath
  • Microros provides the infrastructure for drone-to-drone communication, essentially can turn INav into a swarm capable OS

I believe this would be a nice addition to INav, although I would understand if you think it's out of scope for INav project

amfern avatar Apr 19 '22 10:04 amfern