ItsMeTheBee / VisualStudioROS

Trying to run ROS inside Visual Studio
1 stars 1 forks source link

Include ROS2 GALACTIC in a VISUAL STUDIO 2019 C++ application #1

Open HectorPenades opened 2 years ago

HectorPenades commented 2 years ago

Helllo,

I am trying to include ROS2 Galactic in a project created from VISUAL STUDIO 2019. Is it possible to include the ROS2 libraries in VS2019, can I compile the project with ROS2 from VS2019? I need to be able to publish and subscribe to topics from a program developed in C++ from VISUAL STUDIO 2019. Do you know any solution?

You know any way to include ROS2 Galactic functionalities in my VISUAL STUDIO 2019 project? How I have to configure the properties of the project?

Your example works for me with ROS foxy but i need to work with Galactic.

I am trying to configure the VS2019 project how he you tell :

In a developer command prompt for vs 2019 source ROS and open VS with "devenv" C/C++ > Additional Include Directories = C:\dev\ros2_galactic\include Linker > Additional Library Directories = C:\dev\ros2_galactic\Lib Linker > Input > Additional Dependencies = all .lib files in C:\dev\ros2_galactic\Lib "C:\dev\ros2_galactic\Lib*.lib" Copied all .dll files to output Using Release x64

After that I am trying to include: #include "rclcpp/rclcpp.hpp" but i have some problems...

image

Thanks in advance,

Estándar ISO C++14 (/std:c++14) Visual Studio 2019 (v142) Windows 10. Console Application C++

Thanks,

ROS2 Version: GALACTIC Type of installation: Windows (source)

smeissne commented 1 year ago

Hi @HectorPenades I have the same problems for ROS Humble. Did you find a Solution?

In Addition I have the problem, hat no headers can be found, because all Header are placed inside an additional Subfolder within my installation.

E.g. ros2_humble\include\rclcpp\rclcpp\node.hpp

yerkgb commented 1 year ago

I have the same problem, did you figure it out?