Skip to content

matankleiner/Artificial-Intelligence-Planning-for-Solving-Blocks-World-with-Robots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artificial Intelligence Planning for Solving Blocks World with Robots

shield shield shield shield shield

alt text

Introduction:

This is a university project which use Baxter robot to solve a Blocks World problem using Sense Think Act methodology.

The project run only as a simulation on Gazebo.

In this project first we create a world, made of a table and four blocks in different colors using Gazebo simulation.

Then, we Sense the world using Baxter's head camera and conclude the Initial State (the order of the blocks).

Afterwards we Think. We do it by creating and solving a planning problem using PDDL. The plannign problem solution is a plan to move the blocks from the given Initial State to a Goal State chosen by the user.

Then we Act, using Moveit and Baxter and reached the wanted Goal State.

alt text

Requirements:

We wrote and ran this project on Ubuntu 16 using ROS kinetic.

Setup a workstation for Baxter: https://sdk.rethinkrobotics.com/wiki/Workstation_Setup

We used the following programs:

Gazebo is an open-source 3D robotics simulator which using ODE physics engine, OpenGL rendering, and support code for sensor simulation and actuator control.

Baxter simulation for Gazebo: https://sdk.rethinkrobotics.com/wiki/Simulator_Installation

alt text

MoveIt is an open source robotics manipulation platform. We used it features mainly through python code and Rviz.

Installation: http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/getting_started/getting_started.html

alt text

We used the follwoing external python packages (not necessarily at this order, we may have used more packages):

  • rospy
  • roslib
  • roscpp
  • rospack
  • gazebo_msgs
  • gazebo_ros
  • sensor_msgs
  • std_msgs
  • visualization_msgs
  • moveit_commander
  • baxter_core_msgs
  • baxter_interface
  • baxter_gazebo
  • baxter_tools
  • cv2
  • cv_bridge
  • scipy
  • requests

How to run the project:

Into a terminal on ubuntu enter the following command:

$ ./baxter.sh sim (make sure you are in the directory where baxter.sh file is)

$ roslaunch baxter_gazebo baxter_world.launch

Open a new terminal and run:

$ rosrun baxter_tools enable_robot.py -e

$ rosrun baxter_tools camera_control.py -o head_camera -r 1280x800

$ rosrun image_view image_view image:=/cameras/head_camera/image

Open another terminal and run:

$ rosrun baxter_interface joint_trajectory_action_server.py

Open another terminal and run:

$ roslaunch baxter_moveit_config baxter_grippers.launch

Then run the wanted nodes in another terminal with the command:

$ rosrun <package name> <script name>

First run the sense.py node, then the think_and_act.py node, each one in a different terminal.

You should run the think_and_act.py script from the PDDL directory.

In case of any error, first try to run the project again.
If the script already load models into gazebo (table, blocks) first delete them manually from Gazebo.

Team:

Yuval Snir

Matan Kleiner

Supervised by Ronen Nir

Project's Video:

Video summing the project:

project's video

Changing the order of all the blocks:

project's video

Switching the location of each pair of blocks:

project's video

Switching the red and blue blocks' location:

project's video


In the wiki of thie repo there is a lot of links and information we accumulate during the work on this project.