0
$\begingroup$

I've recently been encountering an issue when trying to create a working catkin workspace for ROS through RoboStack.

Robostack is utilized to create a working ROS environment installed in Conda.

When activating the environment in Conda, I have been able to successfully very that ROS is working when I run the set ros command through the miniconda command prompt:

(robostackenv) C:\.....>set ros ROS_DISTRO=noetic ROS_ETC_DIR=C:\Users\user\miniconda3\envs\robostackenv\Library\etc\ros ROS_IP=127.0.0.1 ROS_MASTER_URI=http://127.0.0.1:11311 ROS_OS_OVERRIDE=conda:win64 ROS_PACKAGE_PATH=C:\Users\user\miniconda3\envs\robostackenv\Library\share ROS_PYTHON_VERSION=3 ROS_ROOT=C:/Users/user/miniconda3/envs/robostackenv/Library/share/ros ROS_VERSION=1 

I've also installed various extensions to succesfully utilize ROS within VSCode (NOT the full IDE Visual Studio one). These extensions include:

  • ROS
  • C/C++ (VsCode is configured with a GCC compiler, which allows it to run C//C++ files already
  • CMake

However, for some reason I can't create a workspace for ROS. I've already created a catkin_workspace and src folder by:

(robostackenv) C:\.....>robostackenv\mkdir catkin_workspace (robostackenv) C:\.....>robostackenv\catkin_workspace\mkdir src 

But every time I try to utilize catkin_make within the main workspace directory, it ends up failing:

(robostackenv) C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace>catkin_make Base path: C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace Source space: C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\src Build space: C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\build Devel space: C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\devel Install space: C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\install Copying file from "C:\Users\user\miniconda3\envs\robostackenv\Library\share\catkin\cmake\toplevel.cmake" to "C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\src\CMakeLists.txt" #### #### Running command: "cmake C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\src -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_DEVEL_PREFIX=C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\devel -DCMAKE_INSTALL_PREFIX=C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\install -G NMake Makefiles" in "C:\Users\user\ProgrammingProjects\robostackenv\catkin_workspace\build" #### CMake Error at CMakeLists.txt:6 (project): Running 'nmake' '-?' failed with: The system cannot find the file specified CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Users/user/ProgrammingProjects/robostackenv/catkin_workspace/build/CMakeFiles/CMakeOutput.log". Invoking "cmake" failed 

What am I doing that's wrong? ROS is installed properly with RoboStack, set ros shows that it works, my files are named corrently, what gives?

If I run, catkin_init_workspace, it'll generate a CMakeLists.txt file, but that is it.

$\endgroup$

2 Answers 2

2
$\begingroup$

Did you install a C/C++ compiler, make and CMake? Not the VS Code extensions, the programs themselves.

Be sure also to add them into the Windows path environment variable.

$\endgroup$
1
$\begingroup$

conda-forge/robostack packages on Windows are built with Visual Studio compiler, so in general (beside some simple specific cases) you can't use GCC to compile C++ software that uses them. You need to install the VS2019 or VS2022 C++ compiler, and then install the vs2019_win-64 or vs2022_win-64 conda package to develop C++ software on Windows using catkin.

See https://robostack.github.io/GettingStarted.html#installation-tools-for-local-development for more info.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.