You can find out what signals are getting through from the controller using:
rostopic echo /fixedwing/RC
I found also that the setting in rosflight_keyboard_base.py of (1,1) for the size of the window to capture the keystrokes was unhelpful. If you change it to:
screen = pygame.display.set_mode((400, 400))
it’s much easier to find and put on the top.
(Note to authors, not everyone has a joystick to hand when they’re trying to get this thing to work from scratch from no knowledge. If I get it to work, then I might go and try to source a joystick, because only then might it be worth it!)
Other grave difficulties encountered along the way:
The /param_get service created by the rosflight_io node should probably be in a namespace, such as “/rosflight_io/param_get”
This had me confused with the “rosparam” function, which is a completely different set of parameters.
The remap line at the bottom of https://docs.rosflight.org/user-guide/gazebo_simulation/ is missing a “/” at the start of the “to” parameter:
I’m doing the fixedwing type. Then, after a lot more hassle with unfamiliar stuff (I do not have an RC kit, I’m just trying to make a simulation), I uncovered the following four commands you need to run to make it even possible (running from the keyboard).
rosservice call /calibrate_imu
rosservice call /param_set FIXED_WING 1.0
rosservice call /param_set ARM_CHANNEL 4
rosservice call /param_set MIXER 10
At this point it’s useful to have a window showing you
rostopic echo /rc_raw
You can now click ‘o’ (which is bound to channel 4, and the arms the motors) and it will give errors that it cannot when the RC throttle is high.
Hold down ‘s’ to lower this throttle from its default middle value. Now you can hold down ‘w’ to set the throttle up, and it will finally take off. Phew!
Should I put comments into some github issues so they are more likely to get fixed?