maiermic / robot-cameraman

Robot cameraman similar to Soloshot or Pixio
MIT License
13 stars 5 forks source link

Reading data from SimpleBGC Board using RealtimeData4InCmd NamedTuples #54

Open avidday02 opened 1 year ago

avidday02 commented 1 year ago

Hello @maiermic, I am currently working on a project where I need to obtain real-time/live data from the SBGC so that I can send off parsed IMU data to my Robot Operating System. Your prototype has a good structure which has shown me that I can leverage the pyserial library to control a gimbal controller over a serial interface, but I haven't really seen anything about reading data from the SBGC. I am somewhat new to Python and working at the byte level to get what I am looking for is a bit overwhelming.

I was wondering, how could I go about using the RealtimeData4InCmd NamedTuple to spit out real-time values from a script? I presume I'd need to send out a command to start populating what's in that tuple but I really don't know where to begin. If you could point me in the right direction, I'd greatly appreciate it!

maiermic commented 1 year ago

I presume I'd need to send out a command to start populating what's in that tuple but I really don't know where to begin.

That's right. For example, I read the current angles here. I'm not familiar with the realtime data, but have a look into the specification. It should work in a similar way.

avidday02 commented 1 year ago

Funny enough, I actually figured this out just moments ago using the get_angles() function!