ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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 -0600

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 -0600

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

Question Tools

1 follower

Stats

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

Seen: 569 times

Last updated: Mar 19 '18