Skip to content

ROS PiCar Setup

James Muoghalu edited this page Aug 4, 2017 · 2 revisions

Setting Up the Picar Repository on Your Computer

Preparations

(It is assumed that ROS Kinetic and all other necessary programs are installed on the user's computer.)

The following commands can be used to set up a catkin workspace and download the Git repository to your local Ubuntu machine.

 $ mkdir -p ~/catkin_ws/src
 $ cd ~/catkin_ws/src/
 $ git clone https://github.com/heechul/picar

Building the catkin workspace

 $ cd ~/catkin_ws
 $ catkin_make

Navigate into the catkin directory, and build the workspace along with the picar_base package.


 $ catkin_make --source src/picar/src/

Build the car_model package

 $ source ~/catkin_ws/devel/setup.bash

This command overlays the workspace inside of your console environment. This command has to be called in every terminal tab/window that you open after building the workspace. Alternatively, if you add this line to the bottom of your ~/.bashrc file in your home directory, then you will only need to call source ~/.bashrc once, and you will be good to go.

Opening the Car Model

 $ roslaunch car_model twist_driver.launch

This will open the car_model in RViz, allowing you to move the car using the teleop_twist_keyboard.

 $ roslaunch car_model gazebo.launch

This will open the car_model in Gazebo.

Running the Teleop Keyboard

Open a new terminal window, and navigate into the picar directory.

 $ rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Follow the instructions that appear in the console