clydemcqueen / tello_ros

C++ ROS2 driver for DJI Tello drones
BSD 3-Clause "New" or "Revised" License
191 stars 65 forks source link

error: gazebo_ros/node.hpp: No such file or directory #66

Open Efesendil opened 2 years ago

Efesendil commented 2 years ago

Hello sir, I'm having this error when i compile with colcon build, i can't solve the problem. Should I have to modify my cmake ?

cmake in Tello_gazebo:

cmake_minimum_required(VERSION 3.5) project(tello_gazebo)

=============

Setup

=============

Default to C99

if (NOT CMAKE_C_STANDARD) set(CMAKE_C_STANDARD 99) endif ()

Default to C++14

if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) endif ()

Emulate colcon

if ($ENV{CLION_IDE}) message("Running inside CLion") set(tello_msgs_DIR "${PROJECT_SOURCE_DIR}/../../../install/tello_msgs/share/tello_msgs/cmake") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRUN_INSIDE_CLION") endif ()

Find packages

find_package(ament_cmake REQUIRED) find_package(gazebo REQUIRED) # Note uppercase variables in /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake find_package(gazebo_dev REQUIRED) find_package(gazebo_ros REQUIRED) find_package(geometry_msgs REQUIRED) find_package(rclcpp REQUIRED) find_package(sensor_msgs REQUIRED) find_package(std_msgs REQUIRED) find_package(tello_msgs REQUIRED)

Local includes

include_directories( include ${gazebo_ros_INCLUDE_DIRS} ${geometry_msgs_INCLUDE_DIRS} ${std_msgs_INCLUDE_DIRS} ${tello_msgs_INCLUDE_DIRS} )

=============

Tello Gazebo plugin

=============

add_library( TelloPlugin SHARED src/tello_plugin.cpp )

ament_target_dependencies( TelloPlugin gazebo_dev gazebo_ros geometry_msgs rclcpp std_msgs tello_msgs )

=============

Install

=============

Install targets

install( TARGETS TelloPlugin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin )

Install world and launch files

install( DIRECTORY models worlds launch DESTINATION share/${PROJECT_NAME} )

Install Python scripts

install( PROGRAMS src/inject_entity.py DESTINATION lib/${PROJECT_NAME} )

=============

Run ament macros

=============

ament_package()

clydemcqueen commented 2 years ago

Hi, which version of ROS2? Which branch of tello_ros?

Efesendil commented 2 years ago

ROS2 foxy, and /tello_ws/src/tello_ros/tello_gazebo

clydemcqueen commented 2 years ago

Try sudo apt install ros-foxy-gazebo-ros*

Efesendil commented 2 years ago

Hello again sir, I have successfully compiled the workspace, thank you. But i can't use ros2 launch: And ros2 run doesn't work also. It is a simple question but I can't find anything about it, you have any idea about it ?

~$ ros2 launch tello_gazebo simple_launch.py usage: ros2 [-h] Call ros2 <command> -h for more detailed usage. ... ros2: error: argument Call ros2 <command> -h for more detailed usage.: invalid choice: 'launch' (choose from 'control', 'daemon', 'extension_points', 'extensions', 'node', 'param', 'pkg', 'run', 'service')

clydemcqueen commented 2 years ago

It seems that your ROS2 Foxy install is somehow incomplete. The typical way to install Foxy is sudo apt install ros-foxy-desktop. That should add the "launch" verb the ros2 CLI.

You may be able to fix this by running sudo apt install ros-foxy-launch*.

If you are still running into problems you might benefit from uninstalling Foxy and starting over.

If you're new to ROS2 you may enjoy the tutorials: https://docs.ros.org/en/foxy/Tutorials.html

Efesendil commented 2 years ago

Thank you, programs are running without any problem after these commands !! I just have few questions.

1) Im using a virtual machine (parallels), I have connected to drone wifi from my main system but i guess it doesnt connect from ubuntu. How can i figure it out ?

2) what im exactly trying is to connect ros2 to matlab, so i need to see published and subscribed topics. I didnt find odometry messages and i cant see message descriptions when i type, ex : ros2 topic echo /cmd_vel. Do you know why?