Ask Your Question
1

Strange behavior of takeoff in AR Drone simulator if launch file is separated.

asked 2016-09-25 22:17:12 -0500

alienmon gravatar image

I use tum_simulator for AR Drone from here

I tried to fly the drone. So I launched:

roslaunch cvg_sim_gazebo ardrone_testworld.launch

and I send empty message so the drone take off ( refer to wiki page )

rostopic pub -1 /ardrone/takeoff std_msgs/Empty

It worked fine : The drone take off and stay at a certain height..

----------------------------.

HOWEVER If I separated the ardrone_world.launch into 2 parts, it will make a strange take off behavior when I tried to take off: It kept flying higher and higher (not stay at a certain level)

The ardrone_world.launch is:

<?xml version="1.0"?>
<launch>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find cvg_sim_gazebo)/worlds/ardrone_testworld.world"/>
  </include>


  <!-- Spawn simulated quadrotor uav -->
  <include file="$(find cvg_sim_gazebo)/launch/spawn_quadrotor.launch" >
    <arg name="model" value="$(find cvg_sim_gazebo)/urdf/quadrotor_sensors.urdf.xacro"/> 
  </include>
</launch>

The launch file is basically just launch a world, and a quadrotor.

So , I created a launch file (world.launch) that consist only the part to load/launch the world.

Then I launch the world.launch. And I launch the spawn_quadrotor.launch

Then I tried to take off, but the behavior is different with the previous one : It kept flying higher and higher.

------.

How can that be different? I meant It supposed to do the same thing.

edit retag flag offensive close merge delete

Comments

I think that you might want to post an issue in that GitHup repo.

jayess gravatar image jayess  ( 2017-03-17 14:52:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-16 10:03:28 -0500

mahe_antoine gravatar image

When you launch the spawn_quadrotor.launch, did you pass him the arg about the quadrotor_sensors ?

The behaviour you describe suggest the drone controller doesn't have any information about the altitude of the drone. This information is suppose to be given by the /sonar_height topic which should be describe in the quadrotor_sensors.urdf.xacro file.

Launching "spawn_quadrotor.launch" without argument make him use the default value for model in which the sonar_height isn't describe.

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: 2016-09-25 22:17:12 -0500

Seen: 196 times

Last updated: Sep 25 '16