Skip to main content

Controls

This is now deprecated - Please use Commands

See the commands section for setting these up.

The DroneDeploy Robotics Portal provides the ability to easily bind to a robot for secure control from the cloud.

The following needs to take place to setup control:

  1. Two agent components must be enabled and configured for the robot you want to control
  2. Controls must be configured to specify what payloads are sent to the robot's plugin for specific actions to take place
  3. You must choose when the controls are called, for example from a custom button in the DroneDeploy Robotics Portal or via secure APIs.

For working demonstrations for controls and buttons please review the MAVLink: Deploy an ArduPilot Simulator and ROS: Deploy a TurtleBot Simulator tutorials which have everything pre-configured for control.

Agent Components with Control

DroneDeploy provides Agent plugins for MAVLink and ROS (respectively called mavlink and ros) which provides bidirectional streaming of control messages to your robot.

Regardless of which control plugin you're using (MAVlink or ROS, or both), you will need to enable the Control Receiver component.

Controls

You can think of a Control as a bridge between cloud functionality and the robot's onboard functionality. A Control can also optionally have any number of parameters that are passed into it. Parameter input values can be varied outside of the saved configuration, by connecting a Button.

Controls (and Buttons) can either be added directly to a robot, or via its Profile definition.

ROS Example (TurtleBot Online Tutorial)

In this example, you configure a Control called move, and you want this Control to pass a Twist message into the /turtle1/cmd_vel topic for your robot to act on.

The twist message needs two parameters, the x value for forwards and backwards and z values for the amount of left/right twist.

Control Name: move

Destination: /ros/turtle1/cmd_vel

Payload Template: Note this is just a JSON representation of the existing twist message from the Turtlebot package - the corresponding message for your robot may be different, but either way you can configure it for exactly what your robot is expecting:

{ "linear": { "x": $forwardBack, "y": 0, "z": 0 }, "angular": { "x": 0, "y": 0, "z": $twist } }

Parameters:

  • forwardBack
  • twist

MAVLink Example

In this example, you want a Control called MAV_CMD_NAV_TAKEOFF, which when sent to your MAV-based aircraft tells the flight controller to take off.

Control Name: MAV_CMD_ NAV_TAKEOFF

Destination: /mavlink/COMMAND_LONG

Payload Template: This assumes your robot is armed and ready for flight.

{ "target_system": 1, "target_component": 1,  "command": 22, "param7": $altitude}

Parameters:

  • altitude