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

How does Mavros RC override work?

asked 2014-11-09 22:54:18 -0500

Eric Schneider gravatar image

Hi,

I've been trying to work with the mavros, but the wiki doesn't have a lot of detail about it. I'm using an Iris and connecting with roslaunch mavros apm2_radio.launch.

First I'm setting SYSID_MYGCS to 1, as specified at the bottom of this github issue. Then I'm publishing messages on the command line

$ rosrun mavros mavparam set SYSIS_MYGCS 1
$ rostopic pub -1 /mavros/rc/override mavros/OverrideRCIn '[1500, 1500, 1500, 1500, 1325, 1560, 2000, 1500]'

I'm testing RC by leaving the quadcopter in an unarmed state, connecting a gimbal to RC Channel 6 using APM Mission Planner, then publishing various values on Channel 6 (1560 in the example code) and trying to get the gimbal to move. What happens now is that

  1. When the quadcopter is first powered I have control of the gimbal using our RC controller, channel 6
  2. After setting the SYSID_MYGCS value I still have control with the RC controller
  3. Publishing a mavros/rc/override message with a small deviation in the Channel 6 value does not change the gimbal position, but it does make it so that the RC controller can no longer affect the gimbal position
  4. Publishing messages with a variety of Channel 6 values has no effect, except when there is a large change of >150 in the Channel 6 measurement. This makes the gimbal travel fully in one direction and stay stuck there until you send a largely different Channel 6 value that makes the gimbal rail in the other direction.

I feel like I just don't understand what mavros/rc/override is sending to the quadcopter. The gimbal is perfectly controllable using the RC controller before we publish anything to mavros/rc/override, so we know the gimbal is commandable with Channel 6.

I apologize if this is a drone-discuss (or other quadcopter forum) question, not a mavros question, but I don't have a good enough understanding of what mavros is calling under the surface in order to usefully search the drone-discuss forums. If someone has a link to useful non-ROS information I'd welcome it...

edit retag flag offensive close merge delete

Comments

Did you figure this out?

tonybaltovski gravatar image tonybaltovski  ( 2014-12-29 18:21:29 -0500 )edit

Unfortunately not, I'm not sure what's going on with the RC topics. I've been working on other stuff in the meantime.

Eric Schneider gravatar image Eric Schneider  ( 2014-12-30 12:56:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-12-30 13:27:51 -0500

The mavros/rc/override is exactly what you think, it directly overrides the RC that would be sent via the transmitter. The values typically range from 1000 to 2000. If you want give control back to your RC transmitter or ignore a certain channel, publish 65535 on the channel. Can you check what values are coming in on mavros/rc/in when you control it using the RC transmitter?

edit flag offensive delete link more

Comments

I'm away from the quadcopter for a couple weeks, but I'll look into it when I get back, thanks!

Eric Schneider gravatar image Eric Schneider  ( 2014-12-30 13:44:43 -0500 )edit

I have similar problems I can seem to make the override work. The /mavros/rc/in topic displays changes when I use RC but when I run the command

rostopic pub -1 /mavros/rc/override mavros_msgs/OverrideRCIn '[1500, 1500, 1500, 1500, 1325, 1560, 2000, 1500]

it is not working.

Vinh K gravatar image Vinh K  ( 2016-03-02 01:25:15 -0500 )edit

Hi Vinh, Have you managed to solve this. I have the same problem. cheers

Hugo Sardinha gravatar image Hugo Sardinha  ( 2017-08-02 07:13:12 -0500 )edit

my suggestion, is RC override will work with PX4 firmware. But do not use it. It gives unexpected result. Sometimes it will go up smoothly while other time it will jump very fast and dangerous.

Vinh K gravatar image Vinh K  ( 2017-08-02 10:56:07 -0500 )edit

so how do you control yaw using mavros? say imagine you want to rotate 180 degrees around z

Hugo Sardinha gravatar image Hugo Sardinha  ( 2017-08-02 11:12:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-09 22:54:18 -0500

Seen: 7,888 times

Last updated: Dec 30 '14