This is our main repository for our robot using the Robot Operating System. Visit our wiki to learn more about the strucure of the project and how to contribute. You can also go through the steps below to get started.
To get started please follow installation instructions for ros here. ROS only works on linux distributions, it is recommended to install the latest version on Ubuntu as ROS is developed on Ubuntu and a clean intsallation of Ubuntu will contain all the dependencies you need. Once you have followed the instructions on the ROS wiki for installation, getting the project to run is simple.
The first step is to get the workspace set up on your linux machine. To do this clone this repsository anywhere, for the sake of this tutorial we will clone the repository in the home folde ~/. Navigate to the home folder by opening up a terminal and typing
git clone https://github.com/BYU-IGVC/ros_initial.git
This will clone the whole repsotiroy which includes the workspaces our project is in. The next step to get everything setup is to compile our workspace and setup our virtual environment so that we can run our scripts. To do this navigate into the workspace by typing
cd ~/ros_initial/igvc_ws/
You are now in the ROS workspace, next we need to compile all the code. You can do so by running the following command in the workspace
catkin_make
Next we need to enter the virtual environment generated by ROS. This will make things easier when we run the scripts. To enter a virutal environment we run the following command in our workspace
source ./devel/setup.bash
Now that we have everything set up lets test our workspace out. Run the follwing commands.
This will start the main server, everything depends on the roscore running. You can do this in a new termainal, we don't have to be in the same virtual environment as our workspace.
roscore
Next run the following, make sure to do it in the same terminal that you ran the source command in. Otherwise it will not work, the ros commands need to know where everything is. When we build catkin_make will generate all the paths for us, so when we enter the virutal enviroment we don't need to specify the direct path to our scripts.
rosrun state_machine state_machine.py