ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Controlling hector quadrotor with keyboard

asked 2015-09-15 05:33:33 -0600

boon gravatar image

I am trying to realize mapping of an environment with hector slam. But I cannot find a way to takeoff the quadrotor with keybaord teleop. What keyboard control should be used to takeoff hector?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2015-10-15 14:15:46 -0600

hvpandya gravatar image

First of all I hope you are using teleop_twist_keyboard for keyboard teleop.

Now the catch here is this package does not let you control the climb rate (velocity in Z direction) of the quadrotor UAV. A quick fix to test out the demo is to publish a single message on the /cmd_vel topic with a positive velocity-z component and then use keyboard to maneuver the quadrotor:

rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.0, 0.0, 0.3]' '[0.0, 0.0, 0.0]'

Feel free to change the values and test for your specific setup.

A better solution would be to have a simple node publish to cmd_vel. You can also make a custom teleop_node for your specific needs.

Hope this helped, comment if you have any more doubts.

edit flag offensive delete link more

Comments

thanks it work

M imran gravatar image M imran  ( 2015-11-10 03:35:24 -0600 )edit

My quadrotor still does not takeoff. Can you tell me which node controls the quadrotor exactly using cmd_vel?? ardrone has a separate topic for takeoff and land commands. Doesnt hector_quadrotor have a similar topic?

Anurag VV gravatar image Anurag VV  ( 2017-07-27 07:56:59 -0600 )edit

This worked for me.

Andreluizfc gravatar image Andreluizfc  ( 2017-12-05 23:01:35 -0600 )edit

If your quadrotor doesn't take off that's probably because you need to enable the motors.

Try: $ rosservice call /enable_motors "enable: true"

davidakhihiero gravatar image davidakhihiero  ( 2021-06-18 09:35:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-15 05:33:33 -0600

Seen: 2,969 times

Last updated: Oct 15 '15