Dongho Kang (DK)
Dongho Kang (DK) Robotician at UT Austin

WHISKiT Physics Simulator Modification

WHISKiT Physics Simulator Modification

This post expalins how I modified WHISKiT Physics Simulator This is a part of my Final Project for Master of Science in Robotics program at Northwestern University. This is still on-going project which will be finihsed in December 2021. This post includes the progress up to June 2021. You can check my github repository for codes

Introduction

Rats use whiskers to navigate thorugh holes and find open space, As they scan, their whiskers make unexpected contact with an object, and the rat then explores the object to extract the details of its shape. The use of whisker inputs to detect, localize, and extract the spatial properties of objects. With these unique traits, whiksers allow rats to operate in complete darkness1. This project aims simulating digital rat’s whisking over different shapes of objects, understanding the dynamtic data whiskers sense, and finally implementing a digital rat’s whisker-based expoloration algorithm in a simulated world with obstacles.

This project untilized WHISKiT Physics Simulator is a 3D dynamical model of the full rat vibrissal array using the open-source physics engine Bullet Physics and OpenGL. It allows to simulate the sensory input of the vibrissal system, i.e. the mechanical signals (moment and force) generated at the base of each whisker in the array. Based on WHISKiT Physics Simulator, I modified the source codes to integrate three following features:

1) customizable transformation of objects in the simulation world 2) parallel simulation using Northwestern’s high performance computing cluster Quest 3) user-controllable digital rat in the simulation

Virbrissal Sensing over Objects

Objects in the simulation take Buttelt Physics’ transformation data as their parameters. This simulation take different ‘OBJECT’ parameters.

object3

Setting the ‘OBJECT’ parameter to 3 creates the object in the origin of the simulation.

object4

Setting the ‘OBJECT’ parameter to 4 creates the object in the user-specified using cartesian coordinates and 4D quaternion (x,y,z,w)

object5

Setting the ‘OBJECT’ parameter to 5 creates the object in the user-specified using cartesian coordinates and 3D quaternion (yaw,pitch,roll)

shell

While this simulation operates in C++, changing an object or its parameters such as size, position, and orientation in the codes would have required re-compiling. However, using shell scripts to define those parameters eliminates the hassle of re-compiling. Example shell script is shown above with brief explanaiton. You can see more detail about the parameters in the main_opengl.cpp.

xyz

object in the simulation

whisk

Active whisking over a pinecone

Parallel Simulation Over 97 different Objects

Simulating over multiple sets of objects with active vibrissial sensing is time consuming. Therefore, I utilized Northwestern University’s Quest for the parallel simulation over 97 objects. The 97 objects include scans of natural objects such as rocks, tree branches, leaves, and fruits. Each object was simulated 10 times with smalll variation of their position and orientation. TIME_STOP parameter was set to 1.0 with TIME_STOP as 0.001. As a result, force and moment data of right side whiskers were obtained.

Due to the lack of sudo access in Quest server, this part of the project is separated from the master branch to eliminate unecessary libraries for obtaining the simulation result. You can find the codes for parallel simulation in questsim branch

User-Controllable Digital Rat Interface

To control the digital rat’s position and orientation with user input during the simulation, communication between the simulation codes and control codes were setup using msgpack. The control codes allow user to control the digital rat using keyboard and visually represent real-time the data that the rat obtains with vibrassial sensing.

graph

real-time force and moment data

Future Plans

The final goal of this project is to build shape classifers with neural networks. Using Tensorflow gives advantages of convinient implementation of neural networks. With trained weights, I am planning to implement real-time classifer. Ultimately, I will integrate reinforcement learning to imitate and compare how real rats use their whiskers to sense objects.

References

[1] Hartmann MJ. A night in the life of a rat: vibrissal mechanics and tactile exploration. Ann N Y Acad Sci. 2011 Apr;1225:110-8. doi: 10.1111/j.1749-6632.2011.06007.x. PMID: 21534998.

comments powered by Disqus