Skip to content
No description, website, or topics provided.
JavaScript HTML Python C++ Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A ROS package to control Tamiya's Cam-Program Robot.

You can teleoperate the robot with web browser of your smart-phone.

System structure

Electric Structure

Name Role
Raspberry Pi One board PC to control the cam-robot
USB Camera Camera to obtain robot's view
Motor Driver IC controlling DC motors. This repository uses TB6612
R/L-Motor DC motors of the cam robot
Power Bank Battery for Raspberry Pi
Alkaline Battery Battery for the motors
Remote Device Device to access the Pi.

Raspberry Pi OS Setup

Please write Ubuntu image with ROS in a SD card for the Pi. This project uses Ubiquity Robotics' image (ROS Kinetic).


TB6612 needs 2 digital input and 1 PWM input per motor.

This project connects wires according to a following table and a figure.

TB6612 Other Device
A_IN1 Raspi-22
A_IN2 Raspi-27
A_PWM Raspi-17
B_IN1 Raspi-13
B_IN2 Raspi-19
B_PWM Raspi-26
A02 RMotor-BLUE
B01 LMotor-BLUE
VM Alkaline-V+
VCC Raspi-3V3
STBY Raspi-3V3
GND Raspi-GND, Alkaline-V-

If you want to learn about TB6612, please read a guide of SparkFun.

Initial Setup and Motor Test

Before assembling the robot, please test ros and motor working. Please download this project in a catkin-workspace and build it.

cd ~/catkin_ws/src
git clone
cd ~/catkin_ws

Please install pigpio with following commands.

sudo apt-get update
sudo apt-get install pigpio python-pigpio python3-pigpio

We cannot generally run rosnode as root. On the other hand, only root can control Pi GPIO.

When you run pigpiod, a demon controlling GPIO as root, ROS can controll GPIO via pigpiod.

Please start pigpiod with following command.

sudo pigpiod

Please read pin assignment.

cd ~/catkin_ws
rosparam load src/tamiya_cam_robot/pigpio.yaml

Drive the motors!

rosrun tamiya_cam_robot test_run

pigpio.yaml has a string array to define pin assignment.


Location and Orientation of components of the robot are not essential for working. Please design the location and orientation for your purpose.

This project used a vertical stand and a neck extender which is made with a laser cutter.

Obtain Camera Image with Web Browser

Please download and build ROS packages for web-communication and camera.

cd ~/catkin_ws/src
sudo apt-get install ros-kinetic-uvc-camera
sudo apt-get install ros-kinetic-roswww
sudo apt-get install ros-kinetic-rosbridge-suite
git clone
git clone
cd ../

Please run a node publishing a camera image.

rosrun uvc_camera uvc_camera_node

Please see list of topics with an other terminal.

rostopic list

You can get following topic list.


Please run a node to establish a server to watch the camera image.

rosrun web_video_server web_video_server

Plase access http://[RaspberryPi's IP address]:8080/stream?topic=/image_raw and watch the camera image.

When you use the Pi directly (not ssh), you can watch in http://localhost:8080/stream?topic=/image_raw


Please run teleop.launch

roslaunch tamiya_cam_robot teleop.launch

teleop.launch establishes a server for a teleoperation page.

Please access http://[RaspberryPi's IP address]:8085/tamiya_cam_robot/teleop.html

You can’t perform that action at this time.