Closed Dines97 closed 5 years ago
You might want to check out 'vimfly'
https://github.com/byu-magicc/roscopter/blob/master/roscopter_utils/src/vimfly
I haven't used it personally, but I think it works! Perhaps @plusk01 or @mmmfarrell would know better.
I did not say but we are developing a fixed wing and the control scheme in vimfly as I understood for multirotor. How are the commands in general transmitted with the joystick in ROSflight? The rosflight_joy package uses RCRaw messages; vimfly uses Command. So which one is the right one and how to use it? The problem is that we want to further connect opencv and we need to transfer commands from it.
As I understand in RCRaw, the first four variables are responsible for the AETR, right? Then what are the last four variables responsible for?
@Dines97 It seems to me that you have two different options here based off the two different types of "commands" you are talking about. Think about a real hardware system. Rosflight assumes there is always an RC transmitter directly connected to the flight controller. This RC transmitter is used to arm and fly the UAV. Optionally, rosflight supports off board control. These commands (Command msgs) would come from your autopilot running on a computer that is talking to the flight controller. The RC transmitter can always be used to override the off board commands if needed. So here are the two options I understand.
Create a node modeled after 'vimfly' that sends Command messages to the flight controller (rosflight). These commands can be calculated based on the keyboard or however you decide to do it for your node. From what I understand you want to use OpenCV to generate commands based on visual feedback. If this is the case, this option would best replicate a real system in hardware because the flight controller can always accept off board commands (Command msg) from your onboard computer while still listening to the real RC transmitter in case the safety pilot needs to intervene.
Create a node that publishes RCRaw messages. This would be best if you want to simulate the RC transmitter. This node would be modeled after the rosflight_joy node. This would be hard to do with a keyboard since you don't have variables axes (it would be 100% or 0% with a key press).
Hopefully this helps.
A little dumb problem. But I don't have a xbox controller or any other. It’s just that in our team I’m not a pilot, but rather a developer and didn’t think about the need for one for myself. So, how to use the keyboard?