Skip to content
My little Raspberry Pi and ROS robot - with python.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
3D-Model
ROS/catkin_workspace/src
circuit
misc
raspi
test
.gitignore
LICENSE
README.md

README.md

minibot

My little Raspberry Pi and ROS robot - with some python stuff

Setup

Motor Hat

cd ~
git clone  https://github.com/adafruit/Adafruit-Motor-HAT-Python-Library.git
cd Adafruit-Motor-HAT-Python-Library
sudo apt-get install python-dev
sudo python setup.py install

OLED LCD (I2C)

cd ~
sudo apt-get install build-essential python-dev python-pip
sudo pip install RPi.GPIO
sudo apt-get install python-imaging python-smbus
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install

AD converter (MCP3008 via SPI) (ADS1015 via I2C)

cd ~
sudo apt-get install build-essential python-dev python-smbus
git clone https://github.com/adafruit/Adafruit_Python_ADS1x15.git
cd Adafruit_Python_ADS1x15
sudo python setup.py install

IMU (BNO055 via I2C)

cd ~
sudo apt-get install build-essential python-dev python-smbus
git clone https://github.com/adafruit/Adafruit_Python_BNO055.git
cd Adafruit_Python_BNO055
sudo python setup.py install

ROS Setup

  • Install ROS on Raspberry Pi
  • Install necessary ROS packages:
sudo apt-get install ros-kinetic-urg-node ros-kinetic-teleop-twist-keyboard
  • create a catkin workspace without 'src' folder:
mkdir catkin_ws<br>
cd ~/catkin_ws
  • create symbolic link with the name 'src' point to the 'src' folder in the ROS directory in this repository:
ln -s /home/$USERNAME/minibot/ROS/catkin_workspace/src/ src
catkin_make

Other helpful stuff

  • joystick/gamepad driver/test program
sudo apt-get install joystick

Run/Test ROS

The main launch file

On the robot (Raspberry Pi):

roslaunch minibot.launch

On another computer:

export ROS_MASTER_URI=http://hostname:11311
roslaunch ground_control.launch

The different launch files

battery

Observes the battery voltage. For demo/test purpose only. Uses:

  • nodes/battery_publisher.py

camera

Streams the RasPi camera image. Can be viewed with the ROS image_view component. Uses:

  • src/camera.cpp

ground_control

Controls and observes the robots status or sensors (remote). This part has to be started on a different computer than the robot. Uses:

  • rqt_plot
  • joystick_control.launch
  • image_view
  • rviz

joystick_control

Listens to a joystick and controls the robot directly (remote). This part has to be started on a different computer than the robot. The joystick/gamepad has to be connected to that computer, not the robot. Uses:

  • nodes/joy_motor_listener.py

keyboard_control

Listens to a keyboard and controls the robot directly (remote). This part has to be started on a different computer than the robot. The joystick/gamepad has to be connected to that computer, not the robot. Uses:

  • nodes/motor_server.py
  • teleop_twist_keyboard
  • nodes/keyboard_motor_listener.py

keyboard_control_test

Listens to a teleop_twist_keyboard node and prints out the data/messages. Uses:

  • teleop_twist_keyboard
  • nodes/keyboard_listener.py

laser

Starts the urg_node for the laser range finder. This launch file is for convenience, to have only one ssh session open. For demo/test purpose only.

led_server

Turns LEDs on the robot ON or OFF. This is the node for the robot. For demo/test purpose only. Uses:

  • srv/Led.srv

macbook_test

[ ] (details to be checked). Uses:

  • minibot.urdf.xacro
  • tf_broadcaster.py
  • battery_publisher.py
  • imu_bno055.py
  • motor_server.py
  • base_controller.py

mapping

[ ] (robot launch file, details to be checked). Uses:

  • tf_broadcaster.py
  • battery_publisher.py
  • imu_bno055.py
  • motor_server.py
  • base_controller.py
  • urg_node

minibot

Controls the whole robot. To be started on the robot. Uses:

  • tf_broadcaster.py
  • battery_publisher.py
  • imu_bno055.py
  • motor_server.py
  • base_controller.py
  • minibot_camera
  • urg_node

motor_server

Controls the motors on the robot. Uses:

  • motor_server.py
You can’t perform that action at this time.