This solution expect you to have a ROS environment set up.

Do the following:

# You should have created this in the Creating a Workspace Tutorial
$ cd ~/catkin_ws/src
$ catkin_create_pkg name_of_package std_msgs rospy roscpp

Explanation:

  1. The command is catkin_create_pkg.
  2. The name of the package to be created is name_of_package
  3. The dependencies for the package is the list that follows name_of_package (in this case the dependencies are std_msgs rospy roscpp)

Now we build the package that was just created.

$ cd ~/catkin_ws
$ catkin build

Then we update our working directory doing a source on

$ . ~/catkin_ws/devel/setup.bash

 

We are done! The new package should be at ~/catkin_ws/src

Thank you!

 

 

 


Discover more from Humberto Ramos, PhD

Subscribe to get the latest posts sent to your email.

Leave a comment

Trending

Discover more from Humberto Ramos, PhD

Subscribe now to keep reading and get access to the full archive.

Continue reading