No --rosdistro set when setup.bash used

asked 2019-07-28 12:07:42 -0500

mickes27 gravatar image

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?

edit retag flag offensive close merge delete


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.

MCornelis gravatar image MCornelis  ( 2019-07-29 07:39:19 -0500 )edit