The Biological Robotic Imaging Experimentation Framework (BRIEF) is a ROS based robot, tailored to conduct biological imaging and manipulation experiments over extended periods of time. BRIEF combines a Schunk Lightweight Arm LWA 4P with an imaging table and arm constructed in house at The George Washington University SEAS for a Department of Computer Science Senior Design Project.
Contents
- Robotic Manipulation of Biological Samples
- Point Cloud Imaging
- Point Cloud to Mesh Conversion (future)
ROS based projects are heavily dependent on specific computer hardware, operating system, and ROS version. Although it is tempting to use a virtual machine, we have found this creates difficulties. Therefore, in order to guarantee that the installation process works properly we highly recommend that you use the identical configuration of components we suggest in Installation.
We suggest you use either a native Ubuntu 14.04 machine or run Ubuntu 14.04 on a VM of your choosing. Both options are described below and either is acceptable for simulation development; however, most physical arm testing will need to be on a native machine.
Create a Bootable USB with Ubuntu 14.04.5 Desktop (64-bit) and set up your new operating system on a native machine. Configure the Ubuntu 14.04 Desktop to your specifications. We suggest Tools That Will Make Your Life Easier in this README.
VMWare is suggested for a VM if you choose to go this route. First, download the VMWare Workstation Player. Follow the guide to install your Ubuntu 14.04 VM on the Workstation Player here.
The following steps are documentation for how to setup the project ROS packages.
$ sudo apt-get install git
$ git clone https://github.com/gw-cs-sd/sd-18-roblox-let-s-play-part-1.git
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
$ sudo apt-get update
$ sudo apt-get install ros-indigo-desktop-full
$ sudo rosdep init
$ rosdep update
$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ sudo apt-get install python-rosinstall
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
$ echo $ROS_PACKAGE_PATH should output something like:
/home/youruser/catkin_ws/src:/opt/ros/indigo/share
$ wget ftp://anduin.linuxfromscratch.org/BLFS/popt/popt-1.16.tar.gz
$ tar -xzf ftp://anduin.linuxfromscratch.org/BLFS/popt/popt-1.16.tar.gz
$ cd popt-1.16/
$ sudo ./configure --prefix=/usr --disable-static
$ sudo make
$ sudo make install
$ sudo apt-get install ros-indigo-libpcan ros-indigo-ros-control ros-indigo-ros-controllers
$ sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control gazebo2
$ sudo apt-get install libsdformat1 ros-indigo-gazebo-plugins ros-indigo-gazebo-ros
$ sudo apt-get install ros-indigo-joystick-drivers
$ sudo apt-get install ros-indigo-trac-ik
$ sudo apt-get install ros-indigo-trac-ik-kinematics-plugin
$ sudo apt-get install python-dev
$ sudo apt-get install python3-dev
$ rosdep install robot_state_publisher urdf xacro controller_manager geometry_msgs
$ rosdep install ros_control ros_controllers sensor_msgs
$ rosdep install sensor_msgs gazebo_msgs gazebo_plugins
$ rosdep install gazebo_ros gazebo_ros_control
- Go here
- Go to Driver Download and download the most recent tar.gz
$ cd ~/Downloads
$ tar -xzf peak-linux-driver-X.Y.Z.tar.gz
$ cd peak-linux-driver-X.Y.Z
$ make clean
$ sudo make
$ sudo make install
$ sudo apt-get install ros-indigo-moveit
$ source /opt/ros/indigo/setup.bash
- Run
$ roscore
- Open a new terminal and run
$ roslaunch schunk_gripper_communication schunk_test.launch
- An RViz simulator should appear with a visualization of the Schunk LWA4P
As a physical robot arm has super human strength and is expensive, there is a huge importance to hundreds if not thousands of simulations before a physical trial is conducted. The arm has the capability of breaking itself, breaking other objects, or breaking people so the utmost care and attention should be fed into a live, physical demo.
Simulation will reduce the risks of any collision that the robot arm could have when operating in the real world. A proper and valid simulation will make sure that all is well within your program and motion plan. The simulator we are currently using is RViz - ROS's own simulator. Our choosing of this simulator is not to say that another cannot be used; in fact, another simulation could just as easily be used given they will take in the same .urdf and meshes that RViz uses. We have just chosen to use RViz given it is native to ROS and provided quicker progress in the initial phases of the project. Future development may very well opt for another simulator such as Gazebo.
The organization of ROS packages is well defined and has common structure. Please read and be knowledgeable of the information here as this information is crucial to developing within the current working ROS Package. A rundown of the main project ROS package, schunk_gripper_communication, as well as a few support packages are as follows:
The urdf/ directory holds the necessary 'universal robotic descriptor files' needed to simulate the arm within RViz or any other desired simulator like gazebo. If any modifications to the arm (addition of joints, environmental elements, etc.) in simulation need to be made, the arm.urdf.xacro is likely the file that needs to be modified.
If one wants to generate the actual arm.urdf file from the arm.urdf.xacro file, then a
$ rosrun xacro xacro --inorder -o arm.urdf arm.urdf.xacro
call needs to be made.
The meshes/ directory is the one that holds the visualization data for the given arm or object that is going to be placed in simulation.
The srv folder is ROS's simplified service description language. The values above the dashed line in the file specify values that the client or user will provide to the server. The values below the line specify values that the server will send back to the client. The values within schunk_gripper.srv may need to be updated or changed based on the desired functionality and the necessary values that need to be passed between the established server and client services. This communication will be described in the src/ directory description.
For more information on ROS srv, read here.
The launch directory holds the ROS launch files for the given package. A launch file will launch multiple ROS nodes. A launch file is the main way of starting up a functionality within ROS. The command roslaunch is used. Note the above testing command
$ roslaunch schunk_gripper_communication schunk_test.launch
uses roslaunch and then specifies the ROS package and then specifies the desired launch file.
As with any project, the include directory holds the library files that other files will include. Nothing new here.
The config directory should not necessarily be touched by a human unless she or he knows positively what she or he is doing. These files were generated using MoveIt's Setup Assistant which pulls in the urdf of the robot to generate these files. If new config's are needed, see here for automatically generating new ones.
The src directory contains all of the cpp files from which the CMakeLists creates nodes. The main project code is within the three files schunk_gripper_server.cpp, schunk_gripper_client.cpp, and set_schunk.cpp.
schunk_gripper_server.cpp is the server portion of the code as it is so named. This piece of code is ran when one runs the aforementioned schunk_test.launch file. It constantly polls the client, asking for a function to run.
schunk_gripper_client.cpp is the client portion of the code and simply parses a function argument passed in by the calling user and asks the server to perform this function if it is a valid one. Currently, the client can ask the server to (note the following arguments that must be provided for the call to work):
- create_box double x double y double z double x_orient double y_orient double z_orient double w_orient double dimension_stretch_x double dimension_stretch_y double dimension_stretch_z 1 std::string box_id
- remove_box std::string box_id
- pick_box std::string box_id
- place_box std::string vox_id
- plan_motion /* (for random plan) */
- plan_motion double eef_x double eef_y double eef_z
- plan_motion double joint_1 double joint_2 double joint_3 double joint_4 double joint_5 double joint_6
- execute_motion
- test_1
- test_2
A client call can be run using
$ rosrun schunk_gripper_communication schunk_gripper_client *function-name-here*
when the server is running.
Note the use of rosrun instead of roslaunch, given there is no launch file for the client node since it is only one node that needs to be run.
set_schunk.cpp holds the functionality for the created Schunk Object. Look at the set_schunk.h file in the include/schunk/ directory of the schunk_gripper_communication project for supplied arguments. The Schunk Object contains various basic functionalities:
- getIK
- creates the inverse kinematics plan - the joint angles needs for a specified eef pose
- plan_motion
- creates the motion plan, if possible, for a specified eef pose. Note, this function calls getIK
- execute_motion
- executes the motion plan in simulation if there is a motion plan available
- get_eef
- returns the end effector's pose - needs to be fixed
- get_joint_angles
- returns the joint angles of the arm - needs to be fixed
- display_trajectory
- displays the trajectory of the execute_motion call
- jointStatesCallback
- sets the joint angles of the robot arm
- add_object_to_world
- adds a desired collision object to the world
- remove_object_from_world
- removes a desired collision object from the world
- add_object_to_robot
- attaches the object to the robot arm, equivalent to a "pick"
- remove_object_from_robot
- detaches the object from the robot arm, equivalent to a "place"
- randomize_joint_values
- randomizes the joint angles of the schunk in simulation
- reset_joint_values
- resets the joint values back to home position
- reset_trajectory
- resets the stored trajectory plan
- set_planning_time
- sets the planning time of the motion planner
- print_transform
- prints the input transform object
- print_pose
- prints the input pose object
- print_joint_values
- prints the joint values of the robot arm
These files are what specify dependency packages for the whole system as well as link libraries to the necessary nodes. It creates nodes from the specified code in src which a launch file can then initiate upon roslaunch'ing. The package.xml file specifies dependencies for the whole system as well and must include the dependency packages that the CMakeLists.txt file calls.
These packages were obtained from FZI Forschungszentrum Informatik. fzi_icl_can can be found here, and fzi_icl_core can be found here. These packages are dependencies of the main project and do not really need to be studied for the context of this project.
Vim
$ sudo apt-get install vim
Ubuntu 14.04.5 Desktop (64-bit)
https://www.ubuntu.com/download/alternative-downloads
ROS Indigo
http://wiki.ros.org/indigo/Installation/Ubuntu
Catkin Tutorials
MoveIt!
http://docs.ros.org/indigo/api/moveit_tutorials/html/index.html
Install Gazebo
http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install
Build a Ros Package
http://wiki.ros.org/ROS/Tutorials/BuildingPackages http://wiki.ros.org/Packages
For a Gazebo Simulation
http://gazebosim.org/tutorials?tut=ros_wrapper_versions&cat=connect_ros
Install gazebo via ROS
http://gazebosim.org/tutorials?tut=ros_installing
BSD-3-Clause: LICENSE.
Joseph Crandall and Karl Preisner created BRIEF for their George Washington University Senior Design Project
John Shepherd and Liam Douglass have continued the project for their Senior Design Project