← Back to search

[ROS In 5 Minutes] 002 - How to create a ROS Package

The Construct Robotics Institute 4:58

15,099 views · 128 likes Watch on YouTube ↗

Hi all,

welcome to this "ROS In 5 Minutes" videos series.

In today's videos we are going to see how to create a ROS Package.

But before we start, if you want to Learn ROS Fast, we recommend you the following courses:

ROS In 5 Days (Python) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-basics-in-5-days/
ROS In 5 Days (C++) http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-courses-ros-basics-in-5-days-c/

Regarding to the creation of the ROS Package, the commands used on the video to create a package named "tutorial" which depends on the "rospy" package were the following:

cd catkin_ws/src/
catkin_create_pkg tutorial rospy
roscd tutorial

So easy, yeah?

But sometimes when you create a package, ROS is not able to find it "instantly". If this happens, you just source the devel/setup.bash file with:

cd ~/catkin_ws/
source devel/setup.bash

Now you should be able to "roscd YOUR_PACKAGE" without any problem.

After the creation of the package, you compile it with:

cd ~/catkin_ws/
catkin_make

You can see the help about the catkin_create_pkg by passing the "-h" parameter: catkin_create_pkg -h

Either you like the video or not, please leave a comment on the comments section below, so we can interact and learn from each other.

Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.