Strange behavior of takeoff in AR Drone simulator if launch file is separated.
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.
Asked by alienmon on 2016-09-25 22:17:12 UTC
Answers
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.
Asked by mahe_antoine on 2017-05-16 10:03:28 UTC
Comments
I think that you might want to post an issue in that GitHup repo.
Asked by jayess on 2017-03-17 14:52:39 UTC