-
Notifications
You must be signed in to change notification settings - Fork 0
Making a BWI Workspace
Create your user-side rosdep cache:
rosdep update
We'll setup a catkin workspace for you to work with your code, and link it to the ROS Indigo installation. First, you'll have to figure out if an existing workspace is present. You can check with the following command:
test -d ~/catkin_ws/src && echo "Catkin workspace present"
You must have the ROS repositories which contain the .deb for catkin_tools:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
Once you have added that repository, run these commands to install catkin_tools and wstool:
sudo apt-get update
sudo apt-get install python-catkin-tools python-wstool python-rosdep ninja-build
Browse through the current workspace to see what packages are in the workspace. Some of these packages may be ones you are working on, and some of them may have been downloaded while running these install instructions previously. You'll have to remove packages that were downloaded through these install instructions. If you are unsure, ask for help!
To remove a package, run the following command. This step is not reversible. Do not remove any code that you have not uploaded to github..
cd ~/catkin_ws/src
wstool rm <pkg-name>
rm -rf <pkg-name>
Remove all unnecessary packages.
If you don't have an existing catkin workspace, setup a catkin workspace at ~/catkin_ws
:
cd
mkdir -p catkin_ws/src
cd catkin_ws
source /opt/ros/indigo/setup.bash
catkin config --space-suffix _cb --init
cd src
wstool init
Setup your environment. You might want to open ~/.bashrc
in a text editor to ensure you don't have multiple copies of these lines:
echo "source ~/catkin_ws/devel_cb/setup.bash" >> ~/.bashrc
RESTART your terminal
Now your workspace is ready to be used. Since our code is installed from system binaries, it is already available. To understand environment setup in more details, check out the tutorial on the ROS wiki. You should now proceed to the Navigation Tutorial.
Download the appropriate manifest from the BWI repo. If you are using ROS Indigo, this would be indigo.rosinstall
. Rename it to .rosinstall
and move it into the src
directory of your catkin workspace.
Then run:
wstool update
Your src
directory should contain a bunch of newly downloaded packages.
To install the dependencies of the new packages, navigate to the root of the workspace
rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
If you are using a laptop with an Optimus enabled Nvidia graphics card, you will have to install the bumblebee driver and run the following addtional command:
echo "export OPTIRUN_LAUNCH_PREFIX=optirun" >> ~/.bashrc