MAVROS RC Override Python Script Troubleshooting

asked 2018-03-20 01:11:51 -0500

dsposito gravatar image

Hello, I've been writing software for many years but am new to ROS and drone development. I have built a DIY quadcopter drone using Erle Robotics' PXFmini autopilot.

I have the following simple script that successfully arms the drone for a few seconds: https://gist.github.com/dsposito/e9da...

I'm now trying to programmatically pilot the drone 100% using ROS via RC Override. As a simple test, I'd like to have the drone slowly takeoff and rise into the air a few feet, hover roughly in place for a few seconds, and then slowly descend and land. Eventually, I'll want to be able to easily move the drone in a given direction a few inches / feet but that's about it.

NOTE: My drone does not currently have a GPS unit so I've been using the STABILIZE mode to manually control all aspects of the flight.

I'm having a couple of problems with this more advanced script: https://gist.github.com/dsposito/2065...

1.) I'm struggling to understanding how to manage the throttle for a slow, controlled takeoff - the motors either spin slowly or super fast - not sure how to have more granular control. 2.) The script "works" the first time I run it but oddly does not work any time I run it after that (all ros cli output appears successful but the motors do not spin). It's as if the drone gets stuck in a weird state.

I appreciate any help or suggestions you may have!

edit retag flag offensive close merge delete

Comments

1

I am trying to send RC commands in px4 simulation using a ROS node same as your's but I facing the issue while sending RC commands. In the simulation, the drone is not taking off after arming.

Nebula gravatar image Nebula  ( 2018-07-13 04:09:43 -0500 )edit

Hi Nebula, did you found the solution? As i am also stuck on the same.

Desmnd gravatar image Desmnd  ( 2018-11-22 00:29:03 -0500 )edit