Giter Site home page Giter Site logo

robot_calculator's Introduction

MoveIt Packages with Python Scripts Created for ME 396P Lightning Talk, Fall 2022, Team 09

Contents

  1. ur_moveit_config
    • The ur_moveit_config package contains the simplest possible MoveIt configuration for a Universal Robots UR3 manipulator developed using the MoveIt Setup Assistant. It depends on UR-provided packages which can be found at the Universal Robots ROS Drivers page.
  2. ur_scripts
    • The ur_scripts package contains the Python code used to make the robot compute and execute operations. Similar executable movement scripts can be easily created within this package.

Requirements, Dependencies, and Building

These packages are built and tested on a system running ROS1 noetic on Ubuntu 20.04. Users are assumed to already have ROS noetic installed on a machine running Ubuntu 20.04 to execute this demonstration. Details of ROS installation can be found on the ROS Tutorials webpage.

Use of these packages in a non-simulated environment requires the use of the official Universal Robots ROS Drivers.

  1. Create a Catkin workspace:
mkdir -p catkin_ws/src && cd catkin_ws
  1. Clone the contents of this repository:
git clone https://github.com/steven-swanbeck/ur3_calculator.git src/lightning_talk
  1. Clone the UR Robots ROS Driver:
git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver
  1. And the associated description packages:
git clone -b melodic-devel-staging https://github.com/ros-industrial/universal_robot.git src/universal_robot
  1. Install all package dependencies:
sudo apt update -qq
rosdep update
rosdep install --from-paths src --ignore-src -r -y
  1. Make the workspace:
catkin_make
  1. Source the workspace:
source devel/setup.bash

Running Our Demo

To run our demo using RViz in a purely virtual environment, start by sourcing the workspace. Then run:

roslaunch ur_moveit_config demo.launch

Open and source another terminal, then run:

rosrun ur_scripts calculator.py

This will begin the calculator demo. Follow the in-terminal prompts, and enter a calculation string when requested. The string can contain any number of numbers and operations (valid inputs are '+', '-' , '*', '/' , '^' , '(', ')', and any integer or float), and will perform order of operations properly. The output will then be drawn by the robot in RViz. Non-integer outputs are rounded to one decimal place. The calculator will loop to allow several inputs to be processed in succession. Use the input 'q' to exit the calculator. The solutions are only communicated through the movement of the robot, so pay attention as it moves!

Here is an example of how this all looks in simulation:

9.webm

Demo with Real UR3

Here is a demo of the robot computing and writing the answer to 1.2 * 4:

1.2.4.mov

And writing the digits of Pi:

pi.mov

Additional Information about MoveIt

The MoveIt Tutorials contain lots of helpful information to get started with MoveIt's functionality. To avoid redundance, users are directed there for most questions about using MoveIt for their projects.

For the purposes of this presentation, special attention is paid to the Move Group Python Interface, which enables control of a robot using MoveIt and Python script.

One other import functionality of MoveIt is the MoveIt Setup Assistant, which allows many basic configuration and launch files to be developed in a new configuration package for your robot given only a URDF file of the robot. The Setup Assistant makes configuring your robot to use MoveIt very easy. The ur_moveit_config package we made for this project was built using the Setup Assistant in less than 10 minutes!

Our package can be easily modified using the Setup Assistant by running:

roslaunch moveit_setup_assistant setup_assistant.launch

Mess around with all the different options and see how they change the behavior of the robot!

robot_calculator's People

Contributors

steven-swanbeck avatar stevenaswanbeck avatar

Stargazers

 avatar Caleb Horan avatar  avatar

Watchers

 avatar

Forkers

jaredrosenbaum

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.