arl_ardrone_examples
arl_ardrone_examples copied to clipboard
Merging fork
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
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
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
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
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)
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
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.
also I have installed ardrone_autonomy, I think my error is in the cmakelist.txt file
does ardrone_autonomy build by itself?
and then you place, arl_.... in the src and it doesn't work?
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)
1 - does ardrone_autonomy build by itself?
- Yes. I build the ardrone_autonomy itself, following the instructions from here and it works https://github.com/AutonomyLab/ardrone_autonomy.
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
Why are you changing the CMakeList.txt? Why are you changing name to 'ejemplos_ardrone' ?
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
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.