ethz-asl / rotors_simulator

RotorS is a UAV gazebo simulator
1.26k stars 767 forks source link

Documentation of controllers and launch files #291

Open fredrikbissmarckatfoise opened 8 years ago

fredrikbissmarckatfoise commented 8 years ago

Hi, I am trying to evaluate if rotorS is a viable research tool. Installation was no problem, but now I am a bit halted on how to control flights.

Some pointers would be very much appreciated, I am impressed of what I've seen so far..

/Fredrik, Sweden

ToniRV commented 5 years ago

Same for thrust sending the drone to infinity Logitech

ToniRV commented 5 years ago

Here is what I did to get it right:

-    <node name="rotors_joy_interface" pkg="rotors_joy_interface" type="rotors_joy_interface" />
+    <node name="rotors_joy_interface" pkg="rotors_joy_interface" type="rotors_joy_interface">
+      <param name="max_thrust" value="30.0"/>
+      <param name="max_yaw_rate" value="10.0"/>
+      <param name="axis_thrust_" value="1"/>
+      <param name="axis_roll_"   value="3"/>
+      <param name="axis_pitch_"  value="4"/>
+      <param name="button_control_enable_"  value="0"/>
+      <param name="button_control_mode_"  value="1"/>
+      <param name="button_takeoff_"  value="2"/>
+      <param name="button_land_"  value="3"/>
+      <param name="button_yaw_left_"  value="4"/>
+      <param name="button_yaw_right_"  value="5"/>
+    </node>

Now you can use the thrust with the natural left joystick instead of the buttons. Same for pitch/roll for right joystick. Unfortunately, yaw is coded with buttons, so I use L1/R1 instead. I also increased yaw_rate as it was too slow. At the beginning, I decreased thrust_rate but it turns out the default value is great,