Ask Your Question

Ros for Windows 10, ros doesn't recognise my catkin packages!

asked 2020-04-15 07:31:32 -0600

JustNewToROS gravatar image

updated 2020-04-22 04:28:20 -0600

gvdhoorn gravatar image

I am new to ros, and trying to learn from examples.

I create a catkin workspace using catkin_make, and then try to rosrun one of the contents inside of package but ros doesn't recognise package. I think it is about the setup.bat file. In ubuntu there are these lines of code to run after catkin_make:

echo "source ~/robotics/devel/setup.bash" >> ~/.bashrc source ~/.bashrc

But in windows, I just call the setup.bat file which is in the /robotics/devel folder. But it doesn't work anyway.


edit retag flag offensive close merge delete



@JustNewToROS, after running the devel\setup.bat, your /robotics/src should be added to this environment variable %ROS_PACKAGE_PATH%. Can you check if it is the case? Also, you can run rospack list to see what's the packages visible to your workspace. If it looks for the correct location and you still cannot see your package, I'd suggest you sharing your package.xml and your package folder structure, and then we can see what you can check in advance.

Sean Yen gravatar image Sean Yen  ( 2020-04-15 14:41:32 -0600 )edit

Thank you for your answer, I have checked like you suggested:

C:\Windows\System32>echo %ROS_PACKAGE_PATH%


and nothing more.

The procedure didn't add my package's path to the environment variable %ROS_PACKAGE_PATH%.

After a quick research I have found this piece of command -setx- will solve my problem but apparently, it didn't.

After, I run the command and check if the path is changed in a new terminal, it didn't.

How can I add my package's path to the %ROS_PACKAGE_PATH% ?

Thanks again.

JustNewToROS gravatar image JustNewToROS  ( 2020-04-16 09:36:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-21 12:06:30 -0600

JustNewToROS gravatar image

updated 2020-04-21 12:14:25 -0600

I actually solved the problem, well technically the problem wasn't a recognition problem. The problem was the environment variables of ROS on Windows 10 does not get updated for the new terminal windows.

Well this is dumb I must say, but it is what it is.

So if you made a mistake like me and decided to use ROS on Windows 10, the procedure below is what you must do to work properly.

So, after using catkin_make you need to call setup.bat which is in the \devel folder but, BEFORE calling setup.bat you must open several terminal windows to use later or you can only use current terminal for the catkin package operations.

You can check if the the environment variable is updated by using command:


And you will see that in the new terminal windows It will only print out:


while in the previously open terminals it will print out:

C:/Users/<your user="" name="">/<your catkin="" folder="">/src;C:\opt\ros\melodic\x64\share

edit flag offensive delete link more


Well this is dumb I must say, but it is what it is.

This seems like a strange thing to say: if this is not what you expect, it could well be that it's actually something that needs to be fixed, or at the very least explained (ie: in documentation).

You may want to report this on the ms-iot issue tracker(s).

gvdhoorn gravatar image gvdhoorn  ( 2020-04-22 04:27:55 -0600 )edit

The weird thing is; Normally when you have an environment variable on windows 10, and then you modify it, the variable is not updated in the current terminal, you need to open a new terminal and then you can check the parameter's new value.

On the contrary, with ROS terminal it is the opposite. When you modify an environment variable, you can get its new value from the already open terminals, but the new ones these you opened after the modification.

A little bit confusing for me I must say.

JustNewToROS gravatar image JustNewToROS  ( 2020-04-25 11:15:39 -0600 )edit

There is no "ROS terminal". You're using the regular Windows 10 terminal (either cmd, or Powershell, or the "new terminal" which comes with Windows 10).

There may be different settings, but it's all using standard Windows 10 terminals afaik.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-25 11:29:29 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-04-15 07:31:32 -0600

Seen: 966 times

Last updated: Apr 21 '20