Part 1 of the final project of ROS Basics in 5 days (python) related to the topics chapter, I am not able to build my package in the rosject (copy) using catkin build or catkin make. the terminal shows the above message. Can anyone point out what I am doing wrong?
Thank you.
Hi @Aniket2 ,
Sounds like the current shell doesn’t know ROS environment.
Could you try sourcing ROS workspace and retry the build command?
It would be helpful if you print to me the output of $ROS_PACKAGE_PATH
Regards
@marco.nc.arruda, Thanks for the reply.
Here is the output for $ROS_PACKAGE_PATH
img_link_01
I have tried “source .catkin_workspace build/” and found a couple of options as follows.
img_link_02
Do I do something with these?
@Aniket2 ,
You need to source the workspaces like below:
source ~/catkin_ws/devel/setup.bash
Though, you may have a workspace that was compiled using catkin_make
before, so it mixes the workspace settings.
The best to be done is to remove build
and devel
folder and re-compile using the tool your prefer.
After that, catkin commands must be available
Please, let me know if that works for you
@marco.nc.arruda Thanks for the follow-up.
Ok so I did
rm -rf build/ devel/
catkin build
which does not seem to work. It’s giving a similar error like before.
I repeated the above but with
catkin_make
This time It seems to work fine. I am still curious why catkin build
is not working.
Hi @Aniket2
I confirmed that the error is happening when you open a Noetic rosject.
We are going to solve it, but in the meantime, you can run the following command to install the missing dependency before running catkin build
:
pip3 install osrf-pycommon
Cheers.
@ralves Thanks for that, I have tried this and it works well.