MCPcopy Index your code
hub / github.com/Unity-Technologies/Robotics-Object-Pose-Estimation

github.com/Unity-Technologies/Robotics-Object-Pose-Estimation @v0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.1 ↗ · + Follow
231 symbols 552 edges 50 files 94 documented · 41%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Object Pose Estimation Demo

This tutorial will go through the steps necessary to perform pose estimation with a UR3 robotic arm in Unity. You’ll gain experience integrating ROS with Unity, importing URDF models, collecting labeled training data, and training and deploying a deep learning model. By the end of this tutorial, you will be able to perform pick-and-place with a robot arm in Unity, using computer vision to perceive the object the robot picks up.

Want to skip the tutorial and run the full demo? Check out our Quick Demo.

Want to skip the tutorial and focus on collecting training data for the deep learning model? Check out our Quick Data-Collection Demo.

Note: This project has been developed with Python 3 and ROS Noetic.

Table of Contents - Part 1: Create Unity scene with imported URDF - Part 2: Setting up the scene for data collection - Part 3: Data Collection and Model Training - Part 4: Pick-and-Place


Part 1: Create Unity Scene with Imported URDF

This part includes downloading and installing the Unity Editor, setting up a basic Unity scene, and importing a robot. We will import the UR3 robot arm using the URDF Importer package.


Part 2: Setup the Scene for Data Collection

This part focuses on setting up the scene for data collection using the Unity Computer Vision Perception Package. You will learn how to use Perception Package Randomizers to randomize aspects of the scene in order to create variety in the training data.

If you would like to learn more about randomizers, and apply domain randomization to this scene more thoroughly, check out our further exercises for the reader here.


Part 3: Data Collection and Model Training

This part includes running data collection with the Perception Package, and using that data to train a deep learning model. The training step can take some time. If you'd like, you can skip that step by using our pre-trained model.

To measure the success of grasping in simulation using our pre-trained model for pose estimation, we did 100 trials and got the following results:

Success Failures Percent Success
Without occlusion 82 5 94
With occlusion 7 6 54
All 89 11 89

Part 4: Pick-and-Place

This part includes the preparation and setup necessary to run a pick-and-place task using MoveIt. Here, the cube pose is predicted by the trained deep learning model. Steps covered include: * Creating and invoking a motion planning service in ROS * Sending captured RGB images from our scene to the ROS Pose Estimation node for inference * Using a Python script to run inference on our trained deep learning model * Moving Unity Articulation Bodies based on a calculated trajectory * Controlling a gripping tool to successfully grasp and drop an object.


Core symbols most depended-on inside this repo

ToString
called by 8
PoseEstimationDemoProject/Assets/TutorialAssets/RosMessages/Ur3Moveit/msg/UR3Trajectory.cs
load
called by 6
Model/pose_estimation/storage/checkpoint.py
plan_trajectory
called by 5
ROS/src/ur3_moveit/scripts/mover.py
orientation_average_quaternion_error
called by 4
Model/pose_estimation/evaluation_metrics/orientation_average_quaternion_error.py
translation_average_mean_square_error
called by 4
Model/pose_estimation/evaluation_metrics/translation_average_mean_square_error.py
gcs_bucket_and_path
called by 4
Model/pose_estimation/storage/gcs.py
save
called by 4
Model/pose_estimation/storage/checkpoint.py
_linear_normalized
called by 3
Model/pose_estimation/model.py

Shape

Method 134
Function 49
Class 44
Enum 2
Route 2

Languages

Python57%
C#43%

Modules by API surface

PoseEstimationDemoProject/Assets/TutorialAssets/Scripts/PerceptionRandomizers/SurfaceObjectPlacer.cs19 symbols
PoseEstimationDemoProject/Assets/TutorialAssets/Scripts/TrajectoryPlanner.cs17 symbols
Model/pose_estimation/single_cube_dataset.py16 symbols
Model/pose_estimation/storage/checkpoint.py15 symbols
ROS/src/ur3_moveit/src/ur3_moveit/setup_and_run_model.py11 symbols
Model/pose_estimation/model.py8 symbols
Model/pose_estimation/storage/gcs.py7 symbols
Model/pose_estimation/storage/download.py7 symbols
ROS/src/ur3_moveit/scripts/mover.py6 symbols
PoseEstimationDemoProject/Assets/TutorialAssets/Scripts/PerceptionRandomizers/RobotArmObjectPositionRandomizer.cs6 symbols
Model/pose_estimation/pose_estimation_estimator.py6 symbols
Model/pose_estimation/logger.py6 symbols

For agents

$ claude mcp add Robotics-Object-Pose-Estimation \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact