Hector Quadrotor Demo: Take Off Not Working.
Hello,
I am trying to use the hector_quadrotor_demo
, but the UAV is not taking off.
I followed the wiki and did:
$ roslaunch hector_quadrotor_demo outdoor_flight_gazebo.launch
After which, the link above says:
gazebo simulation as well as rviz visualization should start up now, and the quadrotor UAV should be on the ground ready for takeoff.
But when I do:
$ rosservice call /enable_motors true
$ rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0, y: 0.0, z: 1.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}'
The UAV does nothing; does not take off.
On the console, I have the following:
[INFO] [1536635465.572972, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
(...)
[WARN] [1536635495.736880, 0.001000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[controller_spawner-6] process has finished cleanly
(...)
[ INFO] [1536633874.045966140, 1.021000000]: Waiting for position state to be available before starting /action/pose server
[ INFO] [1536633912.570868246, 2.021000000]: Waiting for position state to be available before starting /action/pose server
Which, I do not know if it's related to the UAV not moving.
Thank you in advance.
I'll also leave the whole output since I start the launch file, as there are some warning which I do not know if they are related.
process[rosout-1]: started with pid [15785]
started core service [/rosout]
process[gazebo-2]: started with pid [15801]
process[gazebo_gui-3]: started with pid [15814]
process[robot_state_publisher-4]: started with pid [15817]
process[ground_truth_to_tf-5]: started with pid [15820]
process[controller_spawner-6]: started with pid [15821]
[ WARN] [1536635464.538843876]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
process[estop_relay-7]: started with pid [15839]
process[pose_action-8]: started with pid [15847]
process[landing_action-9]: started with pid [15864]
process[takeoff_action-10]: started with pid [15870]
process[spawn_robot-11]: started with pid [15879]
process[rviz-12]: started with pid [15896]
[ INFO] [1536635464.891581683]: waitForService: Service [/enable_motors] has not been advertised, waiting...
[WARN] [1536635465.572509, 0.000000]: DEPRECATION warning: --shutdown-timeout has no effect.
[INFO] [1536635465.572972, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1536635466.626203711]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1536635466.658819532]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1536635466.682518696]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1536635466.698010678]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
[INFO] [1536635467.486189, 0.000000]: Loading model XML from ros parameter
[INFO] [1536635467.489836, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1536635474.428590, 0.000000]: Calling service /gazebo/spawn_urdf_model
[ INFO] [1536635481.476748863, 0.001000000]: waitForService: Service [/enable_motors] has not been advertised, waiting...
[ INFO] [1536635481.481839312, 0.001000000]: waitForService: Service [/enable_motors] has not been advertised, waiting...
[WARN] [1536635495.736880, 0.001000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[controller_spawner-6] process has finished cleanly
log file: (...)
[INFO] [1536635507.757311, 0.001000]: Spawn status: SpawnModel: Successfully spawned entity
[spawn_robot-11] process has finished ...
Same issue here.
Maybe you are trying to enable motors before this service is advertised. Wait some time for it, and then try to enable the service.
I have made so many changes on mine, that I actually don't know what changed made it work. But beyond enable motors service I had to change simulator configurations due to ROS kinect issues. See: https://answers.ros.org/question/2447...