Lab 1: Starting ROS and the Fetch simulator and getting the starter code - cse481sp17/cse481c GitHub Wiki
Start ROS
roscore
Start the Fetch simulator
roslaunch fetch_gazebo playground.launch
The very first time you run the simulator on a new computer, it will take some time to start up. If it doesn't appear to work after a minute or so, shut down the simulator with Ctrl-C and restart it. It may take several tries.
You should see the following:
Get the starter code
Set up SSH keys on Github
We recommend adding your SSH keys to Github. All of the course computers already have SSH keys. Go to your Github SSH keys settings and paste the contents of your ~/.ssh/id_rsa.pub into a new SSH key:
gedit ~/.ssh/id_rsa.pub
If you are working on your own computer and do not already have SSH keys, generate them with ssh-keygen
.
Create a workspace
We recommend using Catkin tools, which is a replacement for catkin_make
from the ROS tutorials.
Catkin tools is already installed on the course computers.
This code will migrate your existing Catkin workspace to use Catkin tools:
cd ~/catkin_ws
catkin init
catkin clean -bdy
catkin build
Download the course starter code
cd ~/catkin_ws/src
git clone [email protected]:cse481sp17/cse481c.git -b week1
cd cse481c
git checkout -b week1
Build your workspace:
catkin build
The build should complete successfully with this message, which appears whenever you build a new package for the first time:
[build] Note: Workspace packages have changed, please re-source setup files to use them.
This means that all of your current terminal windows will not be aware of this package (and the package name cannot be tab-completed). The .bashrc files on the course computers are configured to re-source setup files, so you can just source your .bashrc:
source ~/.bashrc
Test that the package built successfully by running:
rosrun applications hello_world.py
You should see:
/hello_world main:8: Hello world!
Save the starter code to your team's repository
You should have received an invitation to join the CSE 481C Github organization: https://github.com/cse481sp17.
You should keep your code and data backed up to the cloud, since our course computers have had some issues in the past. Your team will back up your code to Github as part of the CSE 481C Github organization.
To do this, first change the url of the origin
remote.
Change teamNUMBER to team1, team2, etc.:
git remote set-url origin [email protected]:cse481sp17/teamNUMBER.git
git push -u origin indigo-devel
Do this now.