Ask Your Question
0

Hector Quadrotor [Error] Button 3 out of range, joy has 2 buttons

asked 2017-03-08 14:03:38 -0500

jdtf gravatar image

updated 2017-03-09 01:37:12 -0500

gvdhoorn gravatar image

When I launch the Hector Quadrotor demos I receive a constant string of errors reading:

[Error] [1489003251.6321324, 135.9000000]: Button 3 out of range, joy has 2 buttons

I am also unable to control the quadcoptor through the keyboard teleop modules, or just writing the the /cmd_vel topic directly via rostopic. Are these two things related?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-22 13:51:47 -0500

Hi, I faced the same issue and although it seems you posted your question while ago, I answer so it might be helpful for other folks. Actually, this error, related to running last launch file in the demo launch file "hector_dronerace.launch" where "xbox_controller.launch" is launched. To avoiding this error, you need to connect "xbox joystick" to your laptop. If you don't have one (like me), you can still control the robot with keyboard teleop modules as you mentioned with command: rosrun tiers_drone_racing tello_controller.py However, as you mentioned, with running the default "hector_dronerace.launch", running of above command does not work, because the robot version that spawn in "hector_dronerace.launch" is "quadrotor_with_asus_with_hokuyo_utm30lx" which does not subscribe to /cmd_vel. If you replace:

<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor.launch" &gt;="" <arg="" name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_asus_with_hokuyo_utm30lx.gazebo.xacro"/> <arg name="controllers" value=" controller/attitude controller/velocity controller/position "/> </include>

with

<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor.launch" &gt;<="" p="">

</include>

in "hector_dronerace.launch" (using the default values in "spawn_quadrotor.launch"), you will be able to control the uav with keyboard teleop. Do not forget to enable motors with writing below command in another terminal rosservice call /enable_motors "enable: true"

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-08 14:03:38 -0500

Seen: 153 times

Last updated: Dec 22 '20