ArduPilot / MAVProxy

MAVLink proxy and command line ground station
GNU General Public License v3.0
460 stars 674 forks source link

RC override reset doco bug #42

Closed francisvierboom closed 7 years ago

francisvierboom commented 10 years ago

Hi team

Firstly thanks for this incredible tool. Hoping to contribute to this project.

Was about to file a bug about the rc override not working - doco at http://tridge.github.io/MAVProxy/system.html says to unset an RC override, use

> rc all -1

or

> rc 3 -1

This doesn't work - set an override, then unset, but it will be the same.

STABILIZE> rc 3 1000
2013: RC_CHANNELS_RAW {... chan3_raw : 1000, chan4_raw : 1515, ...
STABILIZE> rc 3 -1
2592: RC_CHANNELS_RAW {... chan3_raw : 1000, chan4_raw : 1515, ...

However I just realised that

rc 3 0 

does work.

3229: RC_CHANNELS_RAW {..., chan2_raw : 1508, chan3_raw : 968, chan4_raw : 1515...

It looks like this is expected behaviour https://github.com/mavlink/pymavlink/blob/master/mavlinkv10.py#L1690

class MAVLink_rc_channels_override_message(MAVLink_message):
    '''
    The RAW values of the RC channels sent to the MAV to override
    info received from the RC radio. A value of -1 means no change
    to that channel. A value of 0 means control of that channel
    should be released back to the RC radio.
francisvierboom commented 10 years ago

By the way I have run into this because I am trying to set off an AUTO mission without the remote control. It only seems to happen following arming by nudging the throttle on the RC. This override allows me to do that nudge programatically - but is there a more sensible approach?

Alexander9005 commented 10 years ago

hi , currently im using mavproxy to control my quadcopter. But somehow, i can't override the channels using RC_OVERRIDE_CHANNEL command which is "rc all 1000". The quadcopter seems to have no response at all when i execute this command using mavproxy connected using USB...... Any advice? Thanks

ahui9907 commented 9 years ago

I set up the environment for raspi to control the APM yesterday ,every things seems ok,i can see a lot of data through raspi,so i tried to congtroll the drone by raspi,but unfortunetly,when i type rc 1 1000,there is no response,why?

ahui9907 commented 9 years ago

It seems I solved it

Benche commented 9 years ago

hello ahui9907

Can you control the APM to change the rc signal (pwm) ?

I want to control my apm to change pitch roll.

ahui9907 commented 9 years ago

Yes,but i am doing some experiment now. you mean use raspi to control the APM?

rmackay9 commented 9 years ago

@ahui9907, @Benche, we really don't recommend controlling copter using rc-overrides. It's much better to use MAVLink messages to directly control position, velocity, etc. There's currently no support for directly controlling the vehicle's lean angle but we can add that. I'd recommend joining the dronekit-python gitter channel. https://gitter.im/diydrones/dronekit-python

ahui9907 commented 9 years ago

@rmackay9,now I joined the room,thanks

Benche commented 9 years ago

@ahui9907
Yes , like this: https://www.youtube.com/watch?v=K_Cc3B4xG1c

Maybe I have many question to ask you.

@rmackay9

I know , but i want to control my apm to move right a little (pitch control) .

I don't want to use GPS position to move.

like this :https://www.youtube.com/watch?v=K_Cc3B4xG1c

ahui9907 commented 9 years ago

@rmackay9 @rmackay9 I have seen the video you posted, I think it is useful for auto landing accurately, and i am also doing this work , i am familiar with the APM code,now I have connected APM and raspi, I can controll the motor spped freely by typing the PWM value in the python commandline, but infact i am not so famililar with opencv and python language , so i ask my freiend who has worked in ARCAA to do the opencv work, and now I need somebody who is familiar with python to write the code that can controll the APM by sending continuously control conmmand accrding to the opencv-based vison signal.

Benche commented 9 years ago

@ahui9907
I'm from Taiwan . I see your information you are in china.

Can i discuss with you in the future(maybe we can use chinese) ?

THKS

ahui9907 commented 9 years ago

@Benche do you majored in UAV?

Benche commented 9 years ago

I major in electronic.

I do small project to control pitch and roll to avoid obstacle.

I only need is "controll the motor speed freely by typing the PWM value in the python

commandline,".

But I don't know use which document .

If you can me give some help in the future ,i will very happy.

Thank

stephendade commented 7 years ago

Fixed in http://ardupilot.github.io/MAVProxy/html/uav_configuration/system.html?highlight=channel#rc