The object_experiments package contains scripts for running experiments involving the UR10. Launching the file experiment.launch
will initialize communication with the UR10 and the Kinects, record a rosbag of all currently running topics, run pre-defined choreography on the UR10 that may interact with objects on the experiment surface, and automatically stop the rosbag recording.
- Turn on the UR10 and initialize it
- Press power button
- When dialog box pops up, press "Go to initialization screen"
- Press "ON"
- Press "START"
- Place necessary objects for experiment inside UR10 gripper prior to running the script (e.g. pick up pencil for "knock_blocks" experiment)
- Run
$ roslaunch object_experiments experiment.launch
- Wait for initialization to be complete
- Call your desired choreography using:
$ rosservice call /start_experiment "choreography:'desired-choreography-name'"
- Navigate to the object_experiments/scripts folder
- Open 'move_group_python_interface.py' in your preferred text editor
- Under the MoveGroupPythonInterface class, add another function with the name of your choreography. The 'knock_blocks' choreography is there as an example.
- You may define a series of pose goals and joint states that the UR10 will execute, along with the desired velocity and acceleration of the movement.
- In the execute_choreography function, add another if/elif statement detailing the name that will call your new choreography.
elif goal.choreography.data == "name-of-choreography"
robot_commander.choreography-function-name()
- Navigate to the object_experiments/scripts folder
- Open 'rosbag_recording.py' in your preferred text editor
- Under the function
choreography_client
, change the variablecommand
to read:
to record some topics:
command = rosbag record -o your-desired-bagfile-directory.../bagfile-name-prefix [topics-to-record]
to record all topics:
command = rosbag record -a -o your-desired-bagfile-directory.../bagfile-name-prefix
- Move the robot to the desired pose using the teaching pendant, calling commands using the MoveIt commander, or running a script using experiment.launch.
- Call
$ rosservice call /start_experiment "choreography:'get_formatted_current_pose'"
. This will generate text with the description of the current pose. - The generated text can then be copied and pasted into 'move_group_python_interface.py' with the precise description of the robot's pose. Replace
your_pose_name
with the desired name of the recorded pose.
- Download the package to ~/catkin_ws/src
- Navigate back to ~/catkin_ws (
$ cd ..
) - Run
catkin_make
- apriltags_ros
- iai_kinect2
- rad_ur10_stack (Note: does not fully compile)
- robotiq (Note: not necessary to run experiments, contains models of the gripper. Also does not fully compile.)
- MultiKinect (/Bishop/MultiKinect)