Commonly Used Commands in Windows CMD and Linux Bash
This chart compares and describes some of the most common commands you’ll use to navigate Windows cmd while you develop ROS apps. The equivalent bash command is also noted, if you are coming from a Linux background or eventually move to a Linux setup.
Change Directory. Used to change the current location in the command interface. E.g
list – List the files and folders in the current directory. E.g
dir .\ or
delete or remove – deletes a file or folder. Be warned! Mistyping parameters for this command can delete a lot of a data quickly!
move – moves a file or folder. E.g
move C:\my_folder C:\my_new_folder
make directory – creates a directory / folder. E.g
Configuring ROS on Windows for Easy Development
This is a continuation on the ‘Running ROS on Windows‘ series. You can find the previous tutorial here.
In our last tutorial, we successfully installed ROS on Windows on a Windows 10 PC and were able to start
roscore and use the command line tools
rostopic list and
Before we get started with too much development, we go through a few steps to make our lives easier in the future. This includes using a tabbed command host and setting it up to use touble-tab completion.
Also note that a chart with common command line commands is included at the top of the page. For future tutorials that use the command line, feel free to refer back to the chart on this page if a new command is used.
ConEmu isn’t itself a command line, but instead is a command line host. This allows it to spawn and contain command line instances (either cmd or PowerShell). This is especially useful for ROS developement because when you run a program or a launch file in ROS, it requires a new command line prompt.
But using ConEmu we can contain each prompt as a tab, and also make running new prompts quick and easy.
First things first, download ConEmu here (download provided by FOSShub) and run the installer.
When prompted, select x64 bit
and continue with the rest of the installation.
Next we install Clink which adds some capabilities on top of Windows cmd, like double tab completion.
Download Clink here and run the installer.
When the following screen is displayed, be sure that both checkbox fields are checked and continue with the installation.
Running ROS on Windows with ConEmu and Clink
Now that we have our tools installed, we can set them up with ROS.
Go ahead and open ConEmu. Click the down-pointing arrow at the top and click Setup tasks. This will allow us to define a specialized instance of a shell specific to ROS.
Select the plus icon at the bottom to add a task and name it “ROS”
Now go to your desktop, right click on the ROS cmd shortcut we made in the previous tutorial, and select Properties
Copy all the text in the Target field
and paste it in the task definition field of the Setup tasks window of ConEmu that we just had open. It should look something like this
Click Save Changes. We should now be able to run an instance of the ROS shell inside ConEmu. Click the down arrow near the top again, this time clicking on ROS.
A new command prompt should start up, with all the powers of ROS!
What about Clink?
Clink is started inside ConEmu by default, now. Want to try it out? Lets start up a roscore. But instead of typing roscore and hitting enter, type ‘rosc‘ and hit the tab key on your keyboard twice. It should show you all the commands Windows has that start with ‘rosc‘.
If there is only one command that starts with those letters, it will autofill the whole command. This is useful when you can’t remember all the commands or forgot their sometimes esoteric spelling!
In this tutorial we’ve set up our environment to make further development easier. We’ve used ConEmu to bring us a concise, tabbed command line experience. And we’ve used Clink to bring us double-tab completion (similar to bash).
In the next tutorial we’ll get started with ROS tutorials on Windows.