My little Raspberry Pi and ROS robot "minibot" - with some Python stuff.
This code is currently tested and working with ROS Kinetic and Ubuntu Mate on the Raspberry Pi (or Ubuntu 16.04 LTS on a virtual machine like Parallels).
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
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
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
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
- 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
cd ~/catkin_ws
- create symbolic link with the name 'src', pointing to the 'src' folder in the ROS directory from this repository:
ln -s /home/$USERNAME/minibot/ROS/catkin_workspace/src/ src
catkin_make
sudo apt-get install joystick
sudo apt-get install ros-kinetic-joystick-drivers ros-kinetic-teleop-twist-joy
Supported by the Kernel - if used with the USB connector.
On the robot (Raspberry Pi):
roslaunch minibot minibot.launch
On another computer (the ground control center):
export ROS_MASTER_URI=http://<hostname>:11311
rosparam set joy_node/dev "/dev/input/js1"
roslaunch minibot ground_control_center.launch
sudo cp raspi/etc__systemd__system__minibot-ros-start.service /etc/systemd/system/minibot-ros-start.service
sudo systemctl daemon-reload
sudo systemctl start minibot-ros-start.service
sudo systemctl enable minibot-ros-start.service
Observes the battery voltage. For demo/test purpose only. Uses:
- nodes/battery_publisher.py
Streams the RasPi camera image. Can be viewed with the ROS image_view component. Uses:
- src/camera.cpp
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
Listens to a joystick and controls the robot remotely. 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
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
Listens to a teleop_twist_keyboard node and prints out the data/messages. Uses:
- teleop_twist_keyboard
- nodes/keyboard_listener.py
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.
Turns LEDs on the robot ON or OFF. This is the node for the robot. For demo/test purpose only. Uses:
- srv/Led.srv
[ ] (details to be checked) Uses:
- minibot.urdf.xacro
- tf_broadcaster.py
- battery_publisher.py
- imu_bno055.py
- motor_server.py
- base_controller.py
[ ] (robot launch file, details to be defined/checked) Uses:
- tf_broadcaster.py
- battery_publisher.py
- imu_bno055.py
- motor_server.py
- base_controller.py
- urg_node
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
Controls the motors on the robot. Uses:
- motor_server.py
Listens to a joystick and controls the robot directly. This part can to be started on the robot. The joystick/gamepad has to be connected to the robot. Uses:
- base_controller.py
- ROS joy_node
- ROS teleop_twist_joy# minibot My little Raspberry Pi and ROS robot "minibot" - with some Python stuff.
This code is currently tested and working with ROS Kinetic and Ubuntu Mate on the Raspberry Pi (or Ubuntu 16.04 LTS on a virtual machine like Parallels).
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
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
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
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
- 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
cd ~/catkin_ws
- create symbolic link with the name 'src', pointing to the 'src' folder in the ROS directory from this repository:
ln -s /home/$USERNAME/minibot/ROS/catkin_workspace/src/ src
catkin_make
sudo apt-get install joystick
sudo apt-get install ros-kinetic-joystick-drivers ros-kinetic-teleop-twist-joy
Supported by the Kernel - if used with the USB connector.
On the robot (Raspberry Pi):
roslaunch minibot minibot.launch
On another computer (the ground control center):
export ROS_MASTER_URI=http://<hostname>:11311
rosparam set joy_node/dev "/dev/input/js1"
roslaunch minibot ground_control_center.launch
sudo cp raspi/etc__systemd__system__minibot-ros-start.service /etc/systemd/system/minibot-ros-start.service
sudo systemctl daemon-reload
sudo systemctl start minibot-ros-start.service
sudo systemctl enable minibot-ros-start.service
Observes the battery voltage. For demo/test purpose only. Uses:
- nodes/battery_publisher.py
Streams the RasPi camera image. Can be viewed with the ROS image_view component. Uses:
- src/camera.cpp
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
Listens to a joystick and controls the robot remotely. 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
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
Listens to a teleop_twist_keyboard node and prints out the data/messages. Uses:
- teleop_twist_keyboard
- nodes/keyboard_listener.py
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.
Turns LEDs on the robot ON or OFF. This is the node for the robot. For demo/test purpose only. Uses:
- srv/Led.srv
[ ] (details to be checked) Uses:
- minibot.urdf.xacro
- tf_broadcaster.py
- battery_publisher.py
- imu_bno055.py
- motor_server.py
- base_controller.py
[ ] (robot launch file, details to be defined/checked) Uses:
- tf_broadcaster.py
- battery_publisher.py
- imu_bno055.py
- motor_server.py
- base_controller.py
- urg_node
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
Controls the motors on the robot. Uses:
- motor_server.py
Listens to a joystick and controls the robot directly. This part can to be started on the robot. The joystick/gamepad has to be connected to the robot. Uses:
- base_controller.py
- ROS joy_node
- ROS teleop_twist_joy