Skip to content

BeaglePilot/mavros

 
 

Repository files navigation

MAVROS

MAVLink extendable communication node for ROS with UDP proxy for Ground Control Station (e.g. QGroundControl).

Feutures

  • Communication with autopilot via serial port (e.g. ArduPilot)
  • UDP proxy for Ground Control Station
  • mavlink_ros compatible ROS topics (Mavlink.msg)
  • Plugin system for ROS-MAVLink translation
  • Parameter manipulation tool
  • Waypoint manipulation tool

Limitations

Only for linux. Depends on Boost library >= 1.49. Catkin build system required (tested with ROS Hydro Medusa and Indigo Igloo).

Parameters

General node parametars:

  • ~/serial_port -- FCU serial device (default: /dev/ttyACM0)
  • ~/serial_baud -- serial baud rate (default: 57600)
  • ~/bind_host -- UDP proxy listen host (default: 0.0.0.0)
  • ~/bind_port -- UDP proxy port (default: 14555)
  • ~/gcs_host -- GCS host
  • ~/gcs_port -- GCS UDP port (default: 14550)
  • ~/system_id -- Node MAVLink System ID (default: 1)
  • ~/component_id -- Node MAVLink Component ID (default: 240 == UDP_BRIDGE)
  • ~/target_system_id -- FCU System ID (default: 1)
  • ~/target_component_id -- FCU Component ID (default: 1)
  • ~/startup_px4_usb_quirk -- autostart mavlink via USB on PX4

Plugins parameters:

  • ~conn_timeout -- FCU connection timeout [sec] (default: 30.0)
  • ~gps/frame_id -- GPS Header.frame_id (default: 'gps')
  • ~gps/time_ref_source -- TimeRefrence Header frame_id (default: 'gps')
  • ~imu/frame_id -- IMU Header.frame_id (default: 'fcu')
  • ~imu/linear_acceleration_stdev -- accel's standard deviation (default: 0.0003)
  • ~imu/angular_velocity_stdev -- gyro's standard deviation [rad] (default: 0.02°)
  • ~imu/orientation_stdev -- deviation for IMU.orientation (default: 1.0)
  • ~param/* -- FCU parameters mapped by ParamPlugin
  • ~mission/pull_after_gcs -- automatically pull waypoints if GCS pulls (default: off)

Servicies

ParamPlugin:

  • ~param/pull -- Pulls FCU params to rosparam
  • ~param/push -- Push rosparam to FCU
  • ~param/get -- Get one FCU parameter
  • ~param/set -- Set one FCU parameter and update rosparam with actual value

WaypointPlugin:

  • ~mission/pull -- Pulls FCU waypoints and publish
  • ~mission/push -- Push new waypoint list to FCU
  • ~mission/clear -- Clear waypoint list
  • ~mission/set_current -- Set current active waypoint (in list)
  • ~mission/goto -- send one waypoint (only APM)

CommandPlugin:

  • ~cmd/command -- Send any COMMAND_LONG (all FCU)
  • ~cmd/arming -- Arm/Disarm command
  • ~cmd/set_mode -- Set FCU operation mode
  • ~cmd/set_home -- Set home position (if supported)

Programs

mavros_node -- main communication node

Main node.

Run example:

rosrun mavros mavros_node _serial_port:=/dev/ttyACM0 _serial_baud:=115200 _gcs_host:=localhost

ros_udp -- additional UDP proxy

Allows you to add a UDP channel for GCS. For example if you need to connect one GCS for HIL and the second on the tablet.

Example (HIL & DroidPlanner):

rosrun mavros mavros_node _gcs_host:='hil-host' _gcs_port:=14556 _bind_port:=14551 &
rosrun mavros ros_udp _gcs_host:='nexus7'

mavparam -- parameter manipulation

Just see --help.

Examples:

rosrun mavros mavparam dump /tmp/apm.param
rosrun mavros mavparam load /tmp/apm2.param

mavwp -- mission manipulation

See --help.

Examples:

rosrun mavros mavwp show -p
rosrun mavros dump /tmp/mission.txt

Installation

Use wstool utility for installation. In your workspace do:

wstool set -t src --git https://github.com/vooon/mavros.git
wstool update -t src

Then use regular catkin_make for biuld and install.

Testing

Simple communication library test (serial-udp bridge):

catkin_make mavudpproxy && ./devel/lib/mavros/mavudpproxy /dev/ttyACM0 115200

Links

About

MAVLink to ROS gateway with UDP proxy for Ground Control Station

Resources

Stars

Watchers

Forks

Packages

No packages published