ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to arm or set quadcopter (Iris+) mode while running ArduCopter SITL with ROS/Gazebo?

asked 2015-11-20 13:24:31 -0500

nemesis gravatar image

updated 2015-11-20 13:25:17 -0500

I am referring to http://dev.ardupilot.com/wiki/using-r...

Based on the code, the following is my understanding of what's happening -

  • You receive input to ROS (mavros) via UDP socket as motor_speeds. These inputs are received from the SITL and ArduCopter code.
  • You publish these motor speeds to the corresponding topic for Gazebo simulation.
  • Data from the simulated vehicle is then send back to SITL code, over the UDP socket.

However, I still don't know how I can use Mavros alongside with SITL to be able to send commands to arm, disarm, takeoff, or change the mode over the socket. Any guidance regarding this would be appreciated!

(Please let me know if any clarification is required)

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-11-23 21:08:36 -0500

hsu gravatar image

There's a pull request for a plugin that talks to SITL using SIM_Gazebo:

https://bitbucket.org/osrf/gazebo/pul...

A short instruction is here, here's what it looks like and we'll add a tutorial down the road.

edit flag offensive delete link more
0

answered 2015-12-05 03:59:34 -0500

vooon gravatar image

updated 2015-12-05 04:00:57 -0500

In this simulation there are two node interacting with APM simulation:

  1. arducopter_sitl_ros — handles simulation loops (data streams from gazebo and autopilot actuator responses)
  2. mavros_node — interacts with telemetry channel and provide some kind of API for other nodes. That part may be used with real drone.

Mavros supports most of APM features, and enough to fly autonomy with users planner/controller node. But you have to look at mavros wiki page, where i tried to write documentation for each plugin (module).

rosrun mavros mavsafety arm
rosrun mavros mavsys mode -c GUIDED
rosrun mavros mavcmd takeoffcur 0 0 5.0

This scripts is useful examples on how to use various plugins ROS-API. And little more handy that standard rosservice call.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-11-20 13:24:31 -0500

Seen: 1,869 times

Last updated: Dec 05 '15