Hi,
I am creating this live 3D model of the kinematics of a humanoid 'robot' I am working on.
I am trying to create some sort of 2D 'dashboard/HUD' type of thing on my screen, which would display some live data in text format (e.g. the value of the angles of joints) and also visual information. I have figured out how to display 2D text using 2 camera objects, 1 for the 3D models (CAMERA=pi3d.Camera(eye=(xcam,ycam,zcam), at = (0,0.5,0) )) and another one for displaying for text (CAMERA2D = pi3d.Camera(is_3d=False)).
I am now trying to complete the second task of creating the visual 2D objects. I have attached a drawing of roughly what I want to create as part of the 'HUD/dashboard'. Whole idea is to visualise the centre of mass of my robot, and how close it is to regions of toppling (green = no toppling, red = high risk of toppling), the blue circle being the centre of mass. In simple terms - I basically need to create, some rectangular boxes (or doesn't even have to be boxes, can be fully painted rectangles), with a DOT/POINT within the box/rectangle. I, initially, thought that I could use the 'Shape' module and spawn cuboids and spheres and by specifying camera = CAMERA2D, would convert them into 2D objects but this turned out to be unsuccessful.
I found something similar to what I want, which is from pi3d demo called 'TigerTank.py', they create a HUD for minimap at bottom right of the screen by spawning 'Sprite' objects and applying textures to it. Is this the only way to create 2D shapes that are projected onto your screen? Or is there any other possible way to achieve this? Maybe, it is possible to do it the way I attempted to initially (by spawning Shapes and specifying the camera = CAMERA2D)? Maybe, I just need extra settings?