mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
879 stars 990 forks source link

Override RC inputs topic #22

Closed vooon closed 10 years ago

vooon commented 10 years ago

Need some tests.

vooon commented 10 years ago

Tested. APM responds only to GCS sysid.

DasRegal commented 10 years ago

Sorry for the stupid question - how to use it? And how set arm/disarm?

vooon commented 10 years ago

Arm/disarm via arming service, or using mavsafety (see it's --help).

RC override via it's topic, http://wiki.ros.org/mavros#rc_io

DasRegal commented 10 years ago

Service /mavros/cmd/arming unavailable.

I type $ roslaunch px4.launch $ rosrun mavros mavsafety arm service [/mavros/cmd/arming] unavailable

$ rosservice list /mavros/get_loggers /mavros/param/get /mavros/param/pull /mavros/param/push /mavros/param/set /mavros/rc/override /mavros/set_logger_level /mavros/set_stream_rate /rosout/get_loggers /rosout/set_logger_level

DasRegal commented 10 years ago

I type $ rosservice call /mavros/rc/override "{channels:[2000,0,0,0,0,0,0,0]}" success: True

but

$ rostopic echo /mavros/rc/in header: seq: 3335 stamp: secs: 1406647307 nsecs: 829219775 frame_id: '' rssi: 0 channels: [0, 0, 0, 0, 0, 0, 0, 0]

vooon commented 10 years ago

Because #48, i blacklist command and waypoint plugins. Now i have pixhawk, but i want close previous issues before trying it.

Override should work, but maybe it requires arming or correct target ids.

DasRegal commented 10 years ago

But RC should work without arming. Or I'm wrong?

vooon commented 10 years ago

Does it work from GCS? APM for example silently drops override message not from GCS system id (parameter).

tonybaltovski commented 10 years ago

Can the RC input be converted to a topic rather then a service?

pmukherj commented 9 years ago

Quick question for @vooon on this! Do you know if there is a way to override just a few channels, while leaving the other channels under RC or autonomous control? I have a gimbal I'd like to control from mavros (connected to the pixhawk PWM out), but don't really want to override the other RC outputs. If the current plugin doesn't support single channel override, I'm thinking mavlink does and this plugin can be extended, I can look into that!

tonybaltovski commented 9 years ago

@pmukherj If you publish 0 for the channel, it will give control back to the RC. Similarly, -1 for a channel means no change should be made to that channel. In order to send the -1, you need to send the maximum of the uint16_t which is 65535 (2^16 - 1). From what I understand, the pixhawk doesn't support rc override.

pmukherj commented 9 years ago

Amazing! That's perfect.

tonybaltovski commented 9 years ago

Are you using the RC override with the pixhawk?

mhkabir commented 9 years ago

This won't work. We don't handle RC override in PX4 stack.

pmukherj commented 9 years ago

Yea, I noticed that conversation in the joystick plugin ticket. Boo! For now, I may just hack my companion computer(Tk1 + odroid) to output the PWM into the gimbal. I have to stick with the px4 stack for testing the setpoint control. Eventually though centralized method to control it all through the pixhawk will be awesome.

mhkabir commented 9 years ago

We can do it via the FMU auxiliary pins. I'm already working on getting the pins started up by default, as they are currently totally "dead" Simple to add a handler and passthrough.

LorenzMeier commented 9 years ago

They are already enabled. Check the rcS / firefly script for the logic how to load a mixer in there.

pmukherj commented 9 years ago

My bad, I have the 3DR IRIS, so the gimbal connection is by default through the Aux out port (1 and 6 = roll and pitch of the gimbal). I was going to move them to the RC out so I can control it through mavros, but this would potentially work much cleaner.

pmukherj commented 9 years ago

If this is easy to pass through, I can give this a test as well! PS: I tested the RC on the APM stack. Works well, after the sysid change suggested here(https://github.com/mavlink/mavros/issues/93). I'll make a note to add that to the wiki.

vooon commented 9 years ago

@pmukherj Look constant CHAN_RELEASE in http://docs.ros.org/indigo/api/mavros/html/msg/OverrideRCIn.html

But as mentioned by @mhkabir this message not supported by PX4.

@LorenzMeier it is possible to add messages for gimbal controller? Maybe it exist BGC with mavlink support? I bought EvvGC and motors, but don't have working camera (camwrt stuck on video subsystem startup) and mounts for that. Also EvvGC seems dead, but it incredibly cheap...

bduva002 commented 4 years ago

This won't work. We don't handle RC override in PX4 stack.

Do you know if px4 support rc_channel_override yet ?

fazlurnu commented 4 years ago

This won't work. We don't handle RC override in PX4 stack.

Do you know if px4 support rc_channel_override yet ?

Yes, now you can use simply by publishing to mavros/rc/override topic

W4li8 commented 1 year ago

This still doesn't work on PX4, does it? rostopic pub -r 10 /mavros/rc/override mavros_msgs/OverrideRCIn "{channels: [1789, 65535, 65535, 65535, 65535, 65535, 65535, 800, 900, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535]}" yields [ WARN] [1690398217.820133869]: RC override not supported by this FCU! I see some stuff about this only working from GS but that doesn't seem to help