ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin_create_pkg error

asked 2017-07-13 19:57:53 -0500

yaqoub gravatar image

updated 2017-07-14 05:46:56 -0500

gvdhoorn gravatar image

Hi , when i use catkin_create_pkg firstpackage std_msgs rospy roscpp , I get the following error message.

usage: catkin_create_pkg [-h] [--meta] [-s [SYS_DEPS [SYS_DEPS ...]]]
                         [-b [BOOST_COMPS [BOOST_COMPS ...]]] [-V PKG_VERSION]
                         [-D DESCRIPTION] [-l LICENSE] [-a AUTHOR]
                         [-m MAINTAINER] --rosdistro ROSDISTRO
                         name [dependencies [dependencies ...]]
catkin_create_pkg: error: argument --rosdistro is required

I am using ROS indigo on Ubuntu 14.04 and as i am a beginner , can someone please help me answer this question ? thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-13 21:35:48 -0500

Ed Venator gravatar image

catkin_create_pkg needs to know what ROS distribution you're using. If you have sourced a ROS setup script, it can detect it automatically. If you haven't sourced a setup script, you need to pass it in as a command line argument. You have two options:

  1. Source the setup script before you try to run catkin_create_pkg:

    source /opt/ros/indigo/setup.bash
    catkin_create_pkg firstpackage std_msgs rospy roscpp
    
  2. Pass the rosdistro into the catkin_create_pkg command with the flag:

    catkin_create_pkg firstpackage std_msgs rospy roscpp
    

P.S. When posting on ROS Answers, you can format code blocks (like the ones I used above) with the 101010 button in the toolbar, and you can format inline code blocks like this by surrounding it with backticks `like this`.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-07-13 19:57:53 -0500

Seen: 677 times

Last updated: Jul 14 '17