parcon / arl_ardrone_examples

This ROS package is designed to help new users use the ardrone_autonomy drivers for the AR drone quadrotor robot. It includes extra helpful nodes for launching, landing, simple open loop flying,,,
21 stars 12 forks source link

Merging fork #2

Open phuicy opened 10 years ago

phuicy commented 10 years ago

I catkinized your code, to make it groovy and hydro compatible. I also solved a minor CMakeList.txt problem.

If you want to grab this code for your git just ask

Guy

Durkein commented 10 years ago

Hi, I like it, You can explain me, please, How run this code?, because I take this errors: Error 1: geometry_msgs::Twist: command not found and others excuse me for my level low the english

phuicy commented 10 years ago

I have tried installing it on 3 computers successfully. The dependencies are: ardrone_autonomy geometry_msgs roscpp sensor_msgs std_msgs tf Do you have all of them installed.

Thank you for replying

Durkein commented 10 years ago

Thank you, for you help.

I created a pkg in the directory of ROS, with $ catkin_create_pkg ejemplos_ardrone std_msgs roscpp ardrone_autonomy geometry_msgs sensor_msgs tf

then Terminal 1: $ roscore Terminal 2: $ roslaunch enviroment.launch Terminal 3: $ rosrun ejemplos_ardrone test_fly.cpp

But Its not work, I have these errors

Error 1: catkin_ws/src/ejemplos_ardrone/src/test_fly.cpp: line 5: geometry_msgs::Twist: command not found

Error 2: catkin_ws/src/ejemplos_ardrone/src/test_fly.cpp: line 6: geometry_msgs::Twist: command not found

Error 3: catkin_ws/src/ejemplos_ardrone/src/test_fly.cpp: line 8: std_msgs::Empty: command not found

Error 4: catkin_ws/src/ejemplos_ardrone/src/test_fly.cpp: line 11: syntax error near unexpected token `('

Error 5: catkin_ws/src/ejemplos_ardrone/src/test_fly.cpp: line 11: `int main(int argc, char\ argv)'

do not understand why, can you help me please, thanks

Durkein commented 10 years ago

My cmakelist.txt is this:

cmake_minimum_required(VERSION 2.8.3) project(ejemplos_ardrone)

find_package(catkin REQUIRED COMPONENTS ardrone_autonomy geometry_msgs roscpp sensor_msgs std_msgs tf )

include_directories( ${catkin_INCLUDE_DIRS} )

add_executable(test_fly src/test_fly.cpp)

phuicy commented 10 years ago

No, I meant that you should check that you have installed (for hydro):

sudo apt-get install ros-hydro-geometry-msgs ros-hydro-sensor-msgs ros-hydro-tf
Durkein commented 10 years ago

Yes. I have installed.. $ sudo apt-get install ros-hydro-geometry-msgs ros-hydro-sensor-msgs ros-hydro-tf 0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.

Durkein commented 10 years ago

also I have installed ardrone_autonomy, I think my error is in the cmakelist.txt file

phuicy commented 10 years ago

does ardrone_autonomy build by itself?

phuicy commented 10 years ago

and then you place, arl_.... in the src and it doesn't work?

phuicy commented 10 years ago

why do you have a different CMakeList.txt?

i.e.

My cmakelist.txt is this:

cmake_minimum_required(VERSION 2.8.3)
project(ejemplos_ardrone)

find_package(catkin REQUIRED COMPONENTS
ardrone_autonomy
geometry_msgs
roscpp
sensor_msgs
std_msgs
tf
)

include_directories(
${catkin_INCLUDE_DIRS}
)

add_executable(test_fly src/test_fly.cpp)
Durkein commented 10 years ago

1 - does ardrone_autonomy build by itself?

2-3- and then you place, arl .... in the src and it does not work? I copy the file to the src arl and then put catkin_make not compile the example, so change the CMakelist.txt

This is what I did: 1-Install the dependencies: ardrone_autonomy geometry_msgs roscpp sensor_msgs std_msgs tf

2 Copy the src directory arl_

3 Running: Terminal 1: $ roscore Terminal 2: $ Roslaunch enviroment.launch Terminal 3: $ Rosrun ejemplos_ardrone test_fly.cppi

and not work

phuicy commented 10 years ago

Why are you changing the CMakeList.txt? Why are you changing name to 'ejemplos_ardrone' ?

Durkein commented 10 years ago

As I did not work with files orginal decided to change some things to see if it worked but it did not work, now I have the original file in the src again and put catkin_make and not recognized in the workspace

Durkein commented 10 years ago

thanks I'll have to learn more of ROS because the error is mine, when I leave the orginal file is not recognized in the workspace appears

$ rosrun arl_ardrone_examples takeoff.cpp

[rosrun] Could not find executable named below reset.cpp catkin_ws / src / arl_ardrone_examples [rosrun] Found the following, but they're not Either files, [rosrun] or not executable:

Thank you very much for your help, I will try to fix it and if I can get the answer here.