Is it possible to create a VS Studio 2019 (IDE) Project for ROS2?
Hi all,
I'm learning ROS2 on Windows. I manage to install ROS2 foxy and it's working fine. Now I have to start my project, I tried to write a simple publisher including:
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.hpp"
If I open it with VS, intellisense doesn't work. For example I don't have any highlighting on:
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr publisher_;
Searching on Google I found 2 way to have the Intellisense suggestions:
- Use VS Code with the ROS extension.
- Create a VS (IDE) project and to setup the VC++ directories path, in Project Options.
Since I have VS 2019 already installed, I would like to use the second one, but I don't understand if it's possible. I mean: if I create a VS studio project containing all the ros package files (CMakeLists, package.xml ecc.), can I still build my package with colcon build
? How should I build it? I have the feeling that .vcxproj file is something "incomprehensible" for the ros ws.
Is it better/easier to use VS Code to write the code, and then keep doing colcon build
and ros2 run ..
with the prompt command?