Skip to content

OptiBots: Motion Capture of Humanoid Robots in Robotic Gaming Simulations Using OptiTrack

Notifications You must be signed in to change notification settings

rhea-mal/humanoid-motion-mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OptiBots: Motion Capture of Humanoid Robots in Robotic Gaming Simulations Using OptiTrack

Project Description

This project integrates Optitrack with OpenSAI to simulate a game of volleyball between two robots: the humanoid robot Toro and the Panda robot arm on a mobile base. The user controls Toro using Optitrack, and the Panda arm returns the ball. The game ends when the ball hits the ground. The camera can switch between a global view and Toro's first-person view, allowing for future VR capabilities.

Global View:

global_view.mov

Head View:

head_view.mp4

Optitrack Human Interface:

optitrack.mov

Prerequisites

Optitrack System Setup - Stanford Robotics Center

  1. Connect the laptop to the white ethernet cable.
  2. Set your laptop IP manually to 172.24.68.64.

Motive Configuration

  1. Launch Motive.

  2. Create rigid bodies:

    • Select a group of markers.
    • Right-click and create a new rigid body.
    • Rename and re-order the rigid bodies in the Assets tab.
  3. Streaming Settings:

    • Go to Edit -> Settings.
    • Click the Streaming tab.
    • Change the IP to 172.24.68.48.
    • Ensure the streaming setting is Unicast.
    • Tick Rigid Bodies and Markers (labeled and unlabeled).
    • Enable streaming.
    • Make sure to disable all streaming before turning off system

Running the Stream Data Script

  1. Navigate to the cs225a/drivers/PythonClient directory.
  2. Run StreamData.py to stream rigid body information to your local Redis server.

Data Retrieval from Redis Server

  • Position keys: sai2::optitrack::rigid_body_pos::(rigid body number)
  • Orientation keys: sai2::optitrack::rigid_body_ori::(rigid body number)
  • Note: (rigid body number) correlates to the rigid body ordering in the Assets tab.

Building the Project

Run the following commands:

mkdir build && cd build
cmake ..
make -j4

### Running the Controllers and Simulation
1. Go to the /bin/optitrack/ directory.
2. Run the following commands in separate terminals:
./toro-controller
./panda-controller
./simviz

### Changing Camera View
Use `redis-cli` to change the camera view by setting the camera position Redis key to zero:
```sh
redis-cli
SET "sai2::sim::toro::global_cam" 1 # for global view
SET "sai2::sim::toro::global_cam" 0 # for local camera attached to head view

About

OptiBots: Motion Capture of Humanoid Robots in Robotic Gaming Simulations Using OptiTrack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published