Za poznati problem rješavanja hanojskih tornjeva u najmanjem broju koraka razvijen je algoritam upravljanja zasnovan na tehnici podržanog strojnog učenja Q-Learning. Nakon simulacije na računalu, algoritam je potvrđen eksperimentalno na robotu Baxter. Robot uz pomoć OptiTrack sustava lokalizira predmete u radnom prostoru te transformira njihove lokacije u vlastiti koordinatni sustav. Zatim pomoću već razvijenog modela upravljanja izvršava slijed radnji potrebnih za premještanje kolutova. Upravljanje robotom te međusobna komunikacija između računala, robota i OptiTrack sustava ostvareni su korištenjem ROS-a.
Iako je ovaj paket namijenjen korištenju uz Baxter robota, implementacija Q-learning algoritma se može koristiti nezavisno.
Napomena: Svugdje gdje se traži ROS verzija koristiti 'kinetic' (često umjesto 'indigo')
- Instalirati ROS (Kinetic): http://wiki.ros.org/kinetic/Installation/Ubuntu
- Instalirati Baxter SDK prema uputama
- Instalirati MoveIt! za ROS Kinetic prema uputama
- Instalirati VRPN prema uputama
- Instalirati ovaj paket sljedećim naredbama:
roscd
cd ../src
git clone https://github.com/mkrizmancic/qlearn_baxter.git
cd ..
catkin_make
- Radi lakše interakcije s robotom preporuka je dodati sljedeće linije u ~/.bashrc:
alias baxter="./baxter.sh" // postavlja Baxter ROS environment
alias sonar="rostopic pub /robot/sonar/head_sonar/set_sonars_enabled std_msgs/UInt16 0" // Gasi sonar
alias bax_enable="rosrun baxter_tools enable_robot.py -e" // Uključi robota
alias bax_disable="rosrun baxter_tools enable_robot.py -d" // Isključi robota
U datoteci across.launch po potrebi promijeniti adresu servera.
Prilikom svakog otvaranja nove konzole:
roscd
cd ..
.\baxter.sh
Za pronalažanje transformacija:
- u prvu konzolu:
roslaunch qlearn_baxter find_transformations.launch
- u drugu konzolu:
rosrun qlearn_baxter interpolate.py
- pogledati upute u docstringu u
interpolate.py
Za testiranje:
roslaunch qlearn_baxter testing.launch
Za izvedbu zadatka:
roslaunch qlearn_baxter main.launch
Za pokretanje samo Q-Learning algoritma:
python QLearning.py
In order to solve a well-known tower of Hanoi problem, an algorithm based on reinforcement machine learning technique Q-learning is developed. After simulation on computer, the algorithm is experimentally confirmed using Baxter robot. Using OptiTrack localization system, the robot finds objects in its working area and transforms their locations in its own coordinate system. Then, using already implemented control model, it performs a set of moves necessary to solve the problem. Control of the robot, as well as the communication between computer, robot and OptiTrack system are implemented using ROS.
Although this package is intended to be used with Baxter robot, Q-Learning algorithm is stand-alone.
Note: Everywhere ROS version is asked, use 'kinetic' (often instead of 'indigo')
- Install ROS (Kinetic): http://wiki.ros.org/kinetic/Installation/Ubuntu
- Install Baxter SDK following this instructions
- Install MoveIt! for ROS Kinetic following this instructions
- Install VRPN following this instructions
- Install this package with follwing commands:
roscd
cd ../src
git clone https://github.com/mkrizmancic/qlearn_baxter.git
cd ..
catkin_make
- For easier interaction with the robot, it is recommended to add following lines to ~/.bashrc:
alias baxter="./baxter.sh" // set up Baxter ROS environment
alias sonar="rostopic pub /robot/sonar/head_sonar/set_sonars_enabled std_msgs/UInt16 0" // Disable sonar
alias bax_enable="rosrun baxter_tools enable_robot.py -e" // Enable robot
alias bax_disable="rosrun baxter_tools enable_robot.py -d" // Disable robot
If needed, change the server adress in across.launch.
Finding transformations:
- in first console:
roslaunch qlearn_baxter find_transformations.launch
- in second console:
rosrun qlearn_baxter interpolate.py
- follow the instructions given in docstring of
interpolate.py
Testing:
roslaunch qlearn_baxter testing.launch
Starting complete system:
roslaunch qlearn_baxter main.launch
Only Q-Learning algorithm
python QLearning.py
cd ~
mkdir CustomPackages
cd CustomPackages
git clone https://github.com/vrpn/vrpn.git
cd vrpn
mkdir build
cd build
cmake ..
make
sudo make install
roscd
cd ../src
git clone https://github.com/larics/vrpn_client_ros.git
cd ..
catkin_make