VSCode and Ros

一.#include “ros.h”

1. After we first install ros, and vscode, open the terminal in our built workspace and enter code. , Open vscode.
2. After opening vscode, the extension on the left (the last icon on the left). Search for C++ and ROS to add.
Insert picture description here

3. On the VS side, Ctrl+Shift+P, open the command line, enter ROS, and ROS Create Catkin package (this is catkin_create_pkg) will appear. After confirming, enter the name of pkg in the first step, enter the dependencies in the second step, and finally the function package Created successfully.

4. After pkg is successfully created, we create a test.cpp file in the src of pkg.

//test cpp
#include"ros/ros.h"
#include"ros/advertise_options.h"

Guess you like

Origin blog.csdn.net/guanxunmeng8928/article/details/109054588