GithubHelp home page GithubHelp logo

samankim / object_experiments Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.48 MB

Scripts for generating XBox Kinect streams tracking interactions between a robot arm and various objects

License: MIT License

CMake 5.31% Python 94.69%

object_experiments's Introduction

Object Experiments

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.

To run an experiment:

  1. Turn on the UR10 and initialize it
    1. Press power button
    2. When dialog box pops up, press "Go to initialization screen"
    3. Press "ON"
    4. Press "START"
  2. Place necessary objects for experiment inside UR10 gripper prior to running the script (e.g. pick up pencil for "knock_blocks" experiment)
  3. Run $ roslaunch object_experiments experiment.launch
  4. Wait for initialization to be complete
  5. Call your desired choreography using: $ rosservice call /start_experiment "choreography:'desired-choreography-name'"

To add new choreography:

  1. Navigate to the object_experiments/scripts folder
  2. Open 'move_group_python_interface.py' in your preferred text editor
  3. Under the MoveGroupPythonInterface class, add another function with the name of your choreography. The 'knock_blocks' choreography is there as an example.
  4. 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.
  5. 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()

To change the directory to which bagfiles are saved/topics to record:

  1. Navigate to the object_experiments/scripts folder
  2. Open 'rosbag_recording.py' in your preferred text editor
  3. Under the function choreography_client, change the variable command 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

To hard-code a new pose in 'move_group_python_interface.py':

  1. Move the robot to the desired pose using the teaching pendant, calling commands using the MoveIt commander, or running a script using experiment.launch.
  2. Call $ rosservice call /start_experiment "choreography:'get_formatted_current_pose'". This will generate text with the description of the current pose.
  3. 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.

To install

  1. Download the package to ~/catkin_ws/src
  2. Navigate back to ~/catkin_ws ($ cd ..)
  3. Run catkin_make

Necessary packages

  • 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)

object_experiments's People

Contributors

samankim avatar rtylecek avatar

Stargazers

Martin Asenov avatar

Watchers

James Cloos avatar Martin Asenov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.