The outcome of this workshop was the E-Basket, a basket that can change the assist rate of the panasonic e-assist bike depending on weather, road condition or high density of people.
This is one of the first steps into modularized, autonomous bike components, that can be plugged into any bike and improve its capabilities, while being self-operating outside the bike.
The code is based on ROS (well known open source libraries to develop robotics) running on a Linux based OS. More precisely, the ROS version used was kinetic and the OS was Ubuntu 16.04 LTS.
Before launching everything, there are some dependencies that need to be installed. So, open up a terminal and run the following commands:
user@machine:~$ sudo pip install pyserial
user@machine:~$ sudo apt-get install ros-kinetic-serial ros-kinetic-vision-opencv ros-kinetic-usb-cam ros-kinetic-rosserial*
If you want to use the tensorflow node, you will need to download version 1.5 or higher and the Object Detection API. Make sure you set the PYTHONPATH
variable properly after installing the object detection API.
To start using the packages, open a terminal and run:
user@machine:~$ mkdir -p catkin_ws/src && cd catkin_ws/src
user@machine:~/catkin_ws/src$ git clone https://github.com/yagoliz/panasonic_workshop.git
user@machine:~/catkin_ws/src$ cd .. && catkin_make
Code to control a 24-LED Neopixel Ring is also provided in these packages. Flash it to an Arduino board you want and that should be it.
The ring will change its color depending on the assist rate sent to the motor.
In order to make it easier to connect to all the USB devices, there are some scripts that will allow you to give them specific names.
You can read this document if you want to set these rules (I highly suggest doing it).
Once everything is set and compiled, you can run the 3 different demos by opening a terminal and typing:
user@machine:~$ roslaunch panasonic start_bike.launch mode:=humidity tensorflow:=false
user@machine:~$ roslaunch panasonic start_bike.launch mode:=accelerometer tensorflow:=false
user@machine:~$ roslaunch panasonic start_bike.launch mode:=pedestrian tensorflow:=true