Robotics StackExchange | Archived questions

No --rosdistro set when setup.bash used

I am trying to make new package - following the tutorial:

~/catkin_ws/src$ sudo catkin_create_pkg beginner_tutorials std_msgs roscpp

But I have an error:

catkin_create_pkg: error: argument --rosdistro is required

It's strange, because in .bashrc I have:

source /opt/ros/melodic/setup.bash

source /home/student/catkin_ws/devel/setup.bash

also, when using this commands directly in shell, gives nothing. What's wrong?

Asked by mickes27 on 2019-07-28 11:54:57 UTC

Comments

Are you sure the environment gets sourced correctly? Adding source /opt/ros/melodic/setup.bash to the bashrc should indeed provide enough information to catkin_create_pkg to deduce the rosdistro. Try running roscore to make sure your ros environment is sourced. Otherwise "catkin_create_pkg --rosdistro melodic package_name dependencies" should work.

Asked by MCornelis on 2019-07-29 07:39:19 UTC

Answers