Just a taster for an up coming walkthrough integrating Serial devices with Blender.

GroG

10 years 1 month ago

Obviously we need to hook up :)

We have 2 processes 

1. Blender  & 2. MRL ... we need to connect them...

Python can be used by either (Jython in MRL's case) 

So lets try to connect .. I'm always a proponent of the "shortest pipe" is the best..  So..

The first question is : Can Blender be in-process to MRL or can MRL be in-process to Blender ?

If not there needs to be a communication bridge between the 2 seperate processes..

(Oh .. Friggen Awesome !!)
quick validation - Servo has POT postioning ----> Analog pin on Propeller ---> PySerial ---> Blender  correct ?

Here is just a picture "Virtual in my Cortex" (I think easiest solution) :-

  1. Keep the Arduino(or Propeller) connected to MRL  (this will service all the outside world sensors)
  2. Virtual InMoov 3D graphic sits in Blenders Game Engine with each of its joints centered (ie virtual Servo joints)
  3. Each Joint is attached to a single blender actuator which controls a separate python def routine. which ultimately just waits for MRL data to move that particular joint either location or rotation etcetc.
  4. MRL will use its virtual comm port (your new service) to talk to Blenders comm port. (ie a victual comm link between ).
  5. Big advantage is MRL ports all the peripherals ie pingdar , wiimote, kinect etcetc.
  6. Go Elves Go
  7. Cavet :- parent_ing/child_ing multiple virtual servos is a mystery to me at momo

 

 

Ya .. looks good to me ..

We just need the following :

  • Python socket server
  • Python which can read a MRLComm serial stream and do what a Propeller/Arduino does in the virtual Blender world - e.g. control a virtual Servo
  • Python virtual Servo - just a modular piece of code which rotates the Blender object

Then we are in the matrix....

 

Yes what you see in the video is a standard metal geared servo...

...taken apart and a wire tacked onto the  wipe_er feedback pot connection (middle) .

The servo can be connected as normal.. with its 4th new leg connected to an ADC.

In unattached servo mode you can use it for manual positional data .... Pose_ing etc (some great possibilities)

In attach servo mode ... it will give constant positional feedback of servo condition.

This mod should be standard on all servos these days, provided your ADC input is high impeadance it should not affect the servos action.

Here is the socket server I was talking about 

Socket Server for interfacing with what Blender call's "middleware" 
https://github.com/morse-simulator/morse/blob/master/src/morse/middleware/socket_request_manager.py

Poking at MORSE a little more I have determined the following

  • MORSE is an interface for middlewares like MRL YARP & ROS (what's that ? :)
  • It says its supported only on Linux, but really that's because it has adapters written in c++ for ROS & YARP - MORSE primarily is Python - we might just be able to add a Python adapter for MRL rather than C++ / this would allow it all to run on any platform Windows Mac and of course Linux

I'll git it and poke it further...