Vicon for Pamy

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
1/20

What is this about?

  • Some general info about the Vicon system
  • The software I implemented for it
    • what it does
    • how to use it
    • where to find the documentation

Presenter Notes

just a reminder how speaker notes work in darkslide

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
2/20

Vicon Nomenclature

Marker:
A single silver ball.
Object:
Multiple markers in a defined arrangement.
Subject:
Same as object...
images/marker_vs_object.jpg

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
3/20

General Tips for Setting up Vicon

images/vicon_cameras.jpg
  • Cameras should be arranged such that markers are seen from different angles.
  • Markers on an objects should be far apart.
  • Cameras need sufficient overlap for successful calibration.
  • Regular re-calibration is needed (Vicon recommends every day).

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
4/20

World Origin

Goal:
Get object poses relative to a known, fixed world origin, persistent over re-calibrations.
Idea:
Use a fixed Vicon subject as world origin → origin subject
Problem:
Vicon does not support this...
Solution:

Use arbitrary origin in Vicon Tracker and transform all objects to origin subject frame.

→ ViconTransformer

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
5/20

The Origin Subject in the Lab

images/ceiling_left.jpg images/ceiling_right.jpg
  • World origin is defined by the "Pamy_left_1" object (former "rll_ping_base")
  • For more robustness, combined with other ceiling markers → "Pamy_ceiling"

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
6/20

Pamy_ceiling

images/screenshot_vicon_tracker_2023-07-31.jpg

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
7/20

Software Overview

images/software_structure_small.png

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
8/20

Software Packages

  • vicon_transformer: Vicon-related but project-agnostic
  • pam_vicon: PAM-specific (uses vicon_transformer)
  • spatial_transformation: generic transformation-related code
    • Transformation class (uses quaternions for rotational part)
    • Compute transformation between point clouds

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
9/20

vicon_transformer

Important Classes:
  • ViconReceiver: Get raw data from Vicon Tracker (via network)
  • PlaybackReceiver: Get raw data from recorded file
  • ViconTransformer: Wrapper around Receiver that transforms all subjects to reference frame of the origin subject.
  • o80Driver/o80Standalone: Template classes for o80 integration
Executables:
  • vicon_print_data: Print raw Vicon data to terminal
  • vicon_record: Record Vicon data for later playback

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
10/20

pam_vicon

Important Classes:
  • o80Driver/o80Standalone: Implementation for PAM objects
  • PamVicon: Wrapper around o80 front end with convenience methods (get_robot_pose(), get_table_pose())
Executables:
  • vicon_o80_standalone: Run o80 back end
  • vicon_o80_print_data: Print Vicon data received through o80
  • record_tennicam_vicon_trajectory: Record data for aligning tennicam
  • compute_tennicam_to_vicon_transform: Compute tennicam transform

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
11/20

ViconTransformer Example

from vicon_transformer import ViconReceiverConfig, ViconReceiver, ViconTransformer

def main():
    config = ViconReceiverConfig()

    with ViconReceiver("vicon_pc_hostname", config) as receiver:
        vt = ViconTransformer(receiver, "my_origin_subject")

        # get new frame from receiver
        vt.update()

        if vt.is_visible("robot_arm_marker"):
            robot_tf = vt.get_transform("robot_arm_marker")
            ...

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
12/20

o80 Example

from pam_vicon import PamVicon


def main() -> None:
    # requires vicon_o80_standalone to be running
    SEGMENT_ID = "vicon"
    pv = PamVicon(SEGMENT_ID)

    # update with latest Vicon data provided through o80
    pv.update()

    robot_pose = pv.get_robot_pose()
    table_pose = pv.get_table_pose(yaw_only=True)

    print(f"Robot Base Pose: {robot_pose}")
    print(f"Table Pose: {table_pose}")

Note: Table pose is computed based on corner positions

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
13/20

Align Tennicam with Vicon

Goal:
Find transformation for tennicam to align with Vicon origin
Procedure:
  • Put a ball on the tip of the LED stick
  • Move it around and record data with both systems
  • Compute transformation
Detailed instructions:
https://intelligent-soft-robots.github.io/ pam_documentation/C9.1_tennicam_vicon_transform.html
images/vicon_tennicam_stick.jpg

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
14/20

How to Visualise Tennicam + Vicon

  • Run tennicam_client_display with --vicon to set table pose from Vicon.
  • Test by moving ball along edges of table.
  • Does currently not include robot.

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
15/20

How to use in learning_table_tennis_from_scratch

Added two options in HysrOneBallConfig:
  • use_vicon: If true set initial robot and table pose via Vicon.
  • vicon_segment_id: Shared memory ID used by o80 (default "vicon").

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
16/20

How to update objects for o80

List of objects for o80 is hard-coded in pam_vicon/o80.hpp:

constexpr std::size_t NUM_SUBJECTS = 11;

enum Subjects  // <-- changes here also need to be updated in Python bindings (srcpy/o80.cpp)
{
    PING_BASE = 0,
    BALL_LAUNCHER_FRONT,
    BALL_LAUNCHER_HEAD,
    TABLE_CORNER_1,
    // ...
};

const std::map<std::string, size_t> _subject_name_to_index = {
    {"Pamy_ceiling", Subjects::PING_BASE},
    {"Ballmaschine Frontmarker", Subjects::BALL_LAUNCHER_FRONT},
    {"Abschusskopf Marker", Subjects::BALL_LAUNCHER_HEAD},
    {"Eckteil 1", Subjects::TABLE_CORNER_1},
    // ...
};

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
17/20

VSK Editor

Goal:
Set object origins based on robot CAD data (where marker positions are exactly known).
Problem:
Vicon does not support this...
Solution (so far):
Create object, then manually edit XML file to fix marker positions.
New solution:
Use vskeditor.py to edit marker positions in the file.
  • Script: https://gitlab.is.tue.mpg.de/-/snippets/40
  • Demo Video: https://asciinema.org/a/THBnqgVbQ6IzQhfWV3wSgIoy4

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
18/20

Unfinished Work

  • Re-calibrate Tennicam-Vicon-transformation.
  • Objects of new robot need to be tested and potentially modified to be more robust.
  • Visualise individual robot links (base, upper arm, lower arm) based on Vicon.
  • Estimate joint angles based on Vicon.

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
19/20

Links

  • Packages (links to package documentation in READMEs)

    • vicon_transformer: https://github.com/intelligent-soft-robots/vicon_transformer
    • pam_vicon: https://github.com/intelligent-soft-robots/pam_vicon
    • spatial_transformation: https://github.com/MPI-IS/spatial_transformation
  • Additional documentation in pam_documentation:

    • https://intelligent-soft-robots.github.io/pam_documentation/C9_vicon.html
    • https://intelligent-soft-robots.github.io/pam_documentation/C9.1_tennicam_vicon_transform.html
  • Vicon objects files: https://atlas.is.localnet/confluence/display/AGBS/Vicon+Objects

Presenter Notes

Vicon for Pamy — Felix Widmaier — 2023-07-31
Source: slides.rst
20/20

Table of Contents

Table of Contents
Vicon for Pamy 1
What is this about? 2
Vicon Nomenclature 3
General Tips for Setting up Vicon 4
World Origin 5
The Origin Subject in the Lab 6
Pamy_ceiling 7
Software Overview 8
Software Packages 9
vicon_transformer 10
pam_vicon 11
ViconTransformer Example 12
o80 Example 13
Align Tennicam with Vicon 14
How to Visualise Tennicam + Vicon 15
How to use in learning_table_tennis_from_scratch 16
How to update objects for o80 17
VSK Editor 18
Unfinished Work 19
Links 20

Help

Help
Table of Contents t
Exposé ESC
Presenter View p
Source Files s
Slide Numbers n
Toggle screen blanking b
Show/hide next slide c
Notes 2
Help h

Generated with Darkslide 6.0.0