Ask Your Question
1

Do I need to call the batch file everytime i execute a ROS2 command in a new terminal

asked 2018-03-19 12:26:23 -0500

aks gravatar image

I am pretty new to ROS2. I have already installed ROS2 on Windows 10 as given in the installation guide. I get an error everytime i try to run a ROS2 command saying "ROS 2 is not recognised as an internal command". I know calling the batch file first resolves this error. But my question is do i need to call it everytime i write a command in the new terminal or have i done something wrong in the installation process ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-03-19 13:12:41 -0500

William gravatar image

No you haven't missed anything in the setup instructions. You need to call the setup.bat file in each terminal before running ROS 2. This is just like how you need to call the vcvarsall.bat file to get access to the visual studio command line tools in a command prompt.

On Linux and macOS you could automate this step by putting this "setup sourcing" command in your ~/.bashrc or similar. I'm not aware of something like this for cmd.exe which is global, though there might be.

Instead you could setup a shortcut which executed cmd.exe and the setup file as it opened the new command prompt. I don't have a link to a tutorial or anything like that, but you could look at the visual studio "developer command prompt" shortcuts, which do something similar, to see how they are setup.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-19 12:26:23 -0500

Seen: 47 times

Last updated: Mar 19 '18