vislab-tecnico-lisboa / ardrone_gazebo

Gazebo simulator test environment for the Parrot ArDrone. The world is a simulated version of the ISR 7th floor. The ArDrone model is based on the implementation of a gazebo simulator for the Ardrone 2.0 written by Hongrong Huang and Juergen Sturm of the Computer Vision Group at the Technical University of Munich (http://wiki.ros.org/tum_simulator).
15 stars 12 forks source link

Quadrotor does not move #4

Closed pulver22 closed 7 years ago

pulver22 commented 7 years ago

We are using Ubuntu 16.04 with ROS Kinetic and Gazebo 7. We downloaded your workspace, compile it without issues and spawing world and quadrotor. We publish a message on /ardrone/takeoff but the robot is not moving in gazebo despite the fact that it is possible to read "Quadrotor takes off" in the console! We tried also to send commands on /cmd_vel but, also in this case the UAV does not move from its position!

Do you have any idea of what is going on?

Cheers!

nigno17 commented 7 years ago

Hi, it was an issue with some changes that I did in order to use multiple drones for a project. I now fixed the bug. Now all drone topics are under the /quadrotor/ namespace. So you must publish an Empty message on the topic /quadrotor/ardrone/takeoff in order make it fly. Let me know if it solved your issue.

Ps: I didn't wrote the ardrone code, I just modified it in order to run it on gazebo 7 and ROS up to KINETIC and added it inside our lab world. The original Ardrone 2.0 was written by Hongrong Huang and Juergen Sturm of the Computer Vision Group at the Technical University of Munich (http://wiki.ros.org/tum_simulator).

pulver22 commented 7 years ago

Hi got the latest version of the repo and now it works! Thank you for fixing it! I checked the diff and I also was wondering about a namespace/topic_remapping issue that I was going to solve by myself!

The only point still unclear to me is the following. Why when I was sending a command to /ardrone/takeoff didn't it fly? It was supposed to do that and, in fact, in the gazebo console I could read "Quadrotors takes off!!!" but in the gui it always remained on the floor.

PS: I am aware of the work done by Huang and Sturm! I used their code until now for my PhD project but now I want to move to something more recent, and your repo is really interesting! Thank you for the contribution!

nigno17 commented 7 years ago

The problem is that in order to spawn multiple drones from code I changed a bit the drone plugins code (the one in the cvg_sim_gazebo_plugins folder). In particular one of the changes was to always add the name of the robot at the beginning of each topic name in the simple controller (on the other hand in the state controller it was enough to give relative names). For this reason you experienced that particular behavior. Now I'm working on a dead line and I don't have time to clean up the code. In the future I will correct it and make it consistent.