Jaú Gretler
← All hexagons

Robotics

Event-Based Vision for Illumination-Robust and Reactive imitation learning

Overview

For my master’s thesis, I spent 6 months at the DYROS robotics lab at SNU in Seoul, South Korea. Under the co-supervision of ETH-SRL and UZH-RPG, I worked on the integration of a special type of camera into a robotic object manipulation pipeline. More specifically, I integrated the comparatively affordable GENX320 event camera Module into a type of robot control framework called "behavioral cloning", using the well-established imitation learning - Action Chunking with Transformers project by Tony Zhao.

Event cameras have a very high dynamic range, allowing them to detect brightness changes simultaneously in very dark and very bright parts of a scene without adjusting an exposure time. Further, they perceive asynchronous per-pixel brightness changes ("events") with microsecond latency. Both properties promise interesting vision benefits for robotics.

In my thesis I setup two experiments aimed at testing the mentioned vision benefits for robotic manipulation.

Experiment 1: Pick-And-Place

For the first experiment I did pick-and-place with a 7-DOF Franka Panda arm with a 1-DOF gripper, placing a green tennis ball in a yellow ring. As an event representation I used a simple event frame. This basically means that I collected the asynchronous event stream over a period of 30 ms and assembled it into a fixed frame.

In case you are wondering why the event frame stream is colored, here is the explanation. During the pick-and-place end-effector trajectory, there are occasional standstills. During these, the event frame is of course empty, since no motion means no events (except if there are flickering lights in the room, which was actually the case during the start of my thesis - the ceiling leights were flickering at power grid frequency and the event camera was picking that up). Anyway, empty frames are bad for imitation learning, because the policy then sees multiple actions associated with the same visual situation. Thus I created an RGB image, where each color channel is an event frame with a different accumulation duration, e.g., red = events from the last 50 ms, blue = events from the last 250 ms etc. This had the added benefit that the resulting color image was natively compatible with the first IL input layer (ResNet-18). Single-channel images would have required some tweaking. In the above video the time durations are not yet long enough since empty frames still appear during standstills.

brigthness-levels.png

In the top row, you can see the three different lighting conditions in which I tested the pick-and-place policies: dark, bright and very bright. The bottom row shows the corresponding event frames, i.e., what the event camera saw. The data was collected in the dark condition. Note how the brightest condition introduces glare and shadows.

pap-diagram.png

The above diagram gives a very rough overview of the IL-ACT structure I setup. I trained three policies, one per perception modality (rgb-only vs. event-only vs. event-rgb-stacked), using the imitation learning - Action Chunking with Transformers project by Tony Zhao.

pick_place_success.png

Here is what we can see in the results. As a reminder: training/baseline-domain: dark, rollout-domain: dark, bright, and very bright.

For the first point, the only exception is the Event-Policy, which for some reasons improves in the bright condition. My only guess is that brighter illumination may have improved the sensor’s response, or the difference may simply reflect sampling variability. For the second, I have the following explanation: RGB frames offer texture+color information, while event frames contain detailed motion cues. Since ACT policies can benefit from both, it is not surprising that the policy having access to both is best. However, outside the training domain the stacked policy is only second best. One reason could be that the RGB frames, which inside the training domain are helpful, become a source of confusion outside the training domain. In other words: The stacked policy may be able to interpret RGB frames when they have the expected illumination, but when they look significantly different, it is confused by them.

The last point demonstrates that the event camera indeed delivered the vision benefit it promised: the high dynamic range created a more or less consistent visual output (see bottom row of "Matched episode-start observations") across different illumination conditions, such that the event policy encountered more similar visual inputs during rollout than the RGB policy did.

Why does the event policy performance increase for bright and then decrease for very bright? I do not know.

Experiment 2: Rolling Ball-Interception System

As mentioned above, event cameras update their pixels with microsecond latency. On the quest to make robotic manipulation more reactive we could well use a fast perception system, especially for dynamic tasks.

To showcase and investigate the usefulness of event vision for IL-based manipulation, I thus setup a ball interception system, consisting of the following components:

For perception the system can rely on either an RGB camera (Intel RealSense D435) or an event camera (Prophesee GenX320). Both cameras are calibrated and can perform localization.

bi_ball_hsv.png

For RGB localization, camera frames are transformed into the HSV color space, where a hue threshold interval reliably identifies the green pixels in the image frame. From there, all it takes is:

  • Morphological operations to create a big blob from the green pixels
  • OpenCV blob detection and outlier rejection
  • Approximating the ball’s 2D center by the blob centroid

A very similar procedure applied to the event frames gives us the 2D ball COM in the event frame.

bi_tracking.png

In the video below, we can see how a ball is flicked towards the interception line. Both perception paths track it and the end effector intercepts the ball. Since the event localizations tended to be quite noisy, the RGB path was used for localization+intercept estimation during most of the project.

The diagram below is a rough overview of the information flow in the ball intercept system.

bi_diagram.png

The images with a blue border illustrate the event camera calibration process. Why is calibration necessary? In computer vision, we speak of internal and external calibration. Internal calibration gives you the pixel location of where a ray of light will pierce the image plane. External calibration, on the other hand, informs you about where in 3D-space the camera is located. If both are known, a camera is fully calibrated and this allows us to do back projection, i.e., finding the 3D light ray which hit a known pixel. So if, say, we know at which pixel the ball center lies and we can assume its center to be at a certain height above the table, we know where the ball is in 3D.

This was straightforward to do for the RGB camera, since it comes with a reasonably accurate internal calibration available, and many tools are readily available for external calibration, which for instance involve taking many pictures of a checkerboard pattern and recording tuples of checkerboard corner detections + camera poses. The joint calibration can then be solved efficiently.

The event camera came uncalibrated. Holding up a normal checkerboard pattern in front of the event camera won’t do, since it sees nothing if there is no movement. To solve this, I displayed a fast flickering checkerboard pattern on my iPad, ran OpenCV checkerboard detection on it and thus could make use of the same PnP solving machinery for joint calibration that was used for the RGB camera.

Unfortunately, I got carried away by my enthusiasm for implementing everything with AI coding agents during this second experiment and lost sight of the big picture I was trying to draw with my experiments. If I had spent more time on literature research, I might have stumbled across this paper, which had pretty much solved the problem I was trying to solve.

Also, I should have realized that imitation learning is more of a hindrance in this dynamic task and that instead I should have started with a pure vision+classical control approach. While my system in the end was doing that (as a means to collect data), I regret reaching this stage so late. For data collection, the system was really superb: thanks to my teleoperation UI + PS4 controller, I was able to collect around 200 two-second episodes of autonomous ball interceptions in 30 min. As a reminder: The main reason for building this autonomous ball interception system was to try to distill the ball-interception skill (performed by the vision+classical controller-path) into an IL policy.

Also: While it was the case that the event path ball localizations arrived much more frequently (~120 Hz vs. 30 Hz) than the ones from the RGB path, the rate of significant prediction change was the same for RGB and event after the IL stage. The following table shows how the event update frequency advantage vanishes as information progresses through the system.

mt-event-rgb-frequencies.png

So essentially, I think I should have first focused on event-camera calibration, which unlocks a fully native event-based localization pipeline. With that, I am pretty confident I could have achieved much faster/more reactive interceptions than the RGB path could. Then, I should have read the literature and chosen e.g., the mentioned LSTM architecture to confirm the findings from the mentioned paper. But as it was, I was trying to optimize all the corners of my system at the same time and only succeeded with the event camera calibration 24 h before the thesis presentation.

Still, it was interesting to setup such a system and to realize that despite their loudly advertised benefits, event cameras can be tricky to work with.

Internship at Hexagon Robotics Hub

Overview

In my internship at the Hexagon Robotics Hub I had the following tasks

In the video below you can see the robot successfully sorting motor parts, while the CEO Arnaud Robert and the vice president Lukas Heinzle give an interview to Reuters. Also, you can see me operating the robot in sandals and socks.


Cybathlon: 6D pose estimation and grasping automation

Overview

During my semester thesis at the Robotic Systems Lab at ETHZ I developed a perception pipeline for the quadrupedal ANYmal robot. Parts of my pipeline were deployed at the 2024 Cybathlon, which is a competition where people with different impairments compete in physical challenges with the help of technological aids. I contributed to the "Spice-Up challenge", in which the robot needs to localize a shelf, navigate to it, grab a spice bottle from within the shelf and place the bottle on top of the shelf, as depicted below. Specifically, the robot needs to localize and grasp the target spice bottle indicated by a sign.

spiceup_setup.svg

Result

As can be seen in the video below, the robot is able to localize the shelf and the target spice bottle, which allows the robot arm on its back to grasp it. The end effector grasp pose is the end result of my perception pipeline. However, I did not implement the motion planning myself.


OSIP: Open Source Inverted Pendulum

Overview

Together with a friend from ETH I am building a single inverted pendulum. For me, this is primarily a welcome opportunity to explore new territories such as CAD design and general mechanical design.

At this point (June 2026) we are able to stabilize a metal pendulum (30 cm, 0.7 kg) in the upright position using a PI controller.

Over a duration of nearly 1.5 years this project was funded by the ETH Student Project House, which greatly relieved the financial burden and let us focus on the fun of coding and designing. Here are some photographic impressions:

4_slider_cart.jpg
whole_pendulum.jpg
distance_sensor.jpg
rail.jpg
hall_sensor_mount.jpg
motor_mount.jpg

Bachelor’s thesis at ETHZ

Overview

I did my bachelor’s thesis at the Institute for Neuroinformatics under Prof. Dr. Mehmet Fatih Yanik. My task was to assemble a robot resembling a small monkey, with height and proportions similar to those of marmoset monkeys. The ultimate goal was and is to let the robot monkey visually demonstrate movements to an audience of real marmoset monkeys, to investigate the imitation learning taking place.

Hardware details

live_monkey.png robot_model.png robot_assem.jpg

I was given the already fabricated robot model and STL files of the base structure, which was to house the servo motors and on top of which the robot monkey would stand.

servo_box.png thread.png

I 3D-printed this base structure, mounted all servo motors and the robot monkey and spent a lot of time connecting the motors with their respective joints with fishing line. These threads transmit the torque from the motor through the robot body to the target joints.

more_threads.jpg
arm_schema.jpg arm_plates.jpg

Next, I setup the power supply circuit according to my supervisor’s instructions. The diagram below on the right depicts its concept. As my debut in laser cutting, I designed an acrylic box with CorelDraw to hold the two power supplies (left picture).

psb_box.jpeg
power.png

Software details

The control architecture I setup to control the robot monkey consists of three steps. First, a user can create 3D waypoints in RViz. Second, those waypoints are passed to the MoveIt motion planner, which can use a multitude of different inverse kinematics solvers to merge the specified waypoints into a feasible path or warn the user if there is no feasible path. Third, the given path is transmitted over the ROS network from the simulation PC to the Raspberry Pi, which in turn sends the calculated signals to the servo motors. The following flowchart (right image) illustrates the individual features of the control interface. The left image shows how waypoints can be set in RViz.

rviz_arc_waypoints.png
monkey_interface_flowchart.jpeg

The project report can be found here.

Short demo of trajectory creation


High school graduation project

Overview

For my high school graduation project (dt.: Maturarbeit) I assembled the right arm of the humanoid robot InMoov as designed by Gael Langevin. I then used an Arduino Mega to control the elbow, the wrist and the fingers with servo motors. The bigger part of the project consisted of setting up different ways of controlling the arm. First, I used a PS4 DualShock controller to control some of the fingers. Next, I used an armband which performed EMG (electromyography) to relay the movements of my own fingers and wrist to the robotic arm. Finally, I tried to connect an EEG (electroencephalography) headset to the arm, hoping to map readings of the electrical activity in my brain to movements of the arm, but that didn't work.

Control via PS4 DualShock Controller

The PS4 DualShock controller has around 30 buttons/knobs one can control. 14 were mapped to finger and wrist movements of the hand. The Bluetooth signals are first sent to the Raspberry Pi, which unlike the Arduino is Bluetooth capable out of the box. The Raspberry Pi then forwards the signals to the Arduino via its GPIO (general-purpose input/output) pins.

Control via EMG (electromyography)


The EMG wristband model is called Myo and was manufactured by Thalmic Labs. They sadly stopped producing and supporting it. The wristband is able to quite accurately determine if the wearer’s hand is in one of the following states: Pinching, flat-spread, fist, flat-up or flat-down. It can be programmed to record arbitrary hand states, i.e., the accompanying electrical patterns measured by the electrodes, over a certain time interval. Sadly, that was, and probably still is, too advanced for me. Further information can be obtained by reading my project report.


Sensory Substitution Device

Attempt to build a prototype for a sensory substitution device

ssdSelfie.jpeg

Inspired by the work of Dr. David Eagleman, this device was intended to test whether such a technological aid can help visually impaired patients detect obstacles, or shapes in general, surrounding them. The plan was that four ultrasonic sensors scan the surroundings of the patient’s head in four directions and then communicate the specific distance to the patient via four vibrating motors on the forehead, each placed behind its corresponding sensor. Unfortunately, I completely forgot that the sonic waves used to measure the distance interfere when more than one sensor is active.

What I did succeed in with this project was getting a glimpse of the thought process behind creating a sensory aid for visually impaired people. Also, I had some inspiring initial conversations with potential test persons with whom I talked about their wishes and expectations for such a device.

Click here to see the breadboard layout and schematics.

More detail: the Cybathlon perception pipeline · Maturarbeit ideas