autodesk-platform-services / aps-iot-extensions-demo

APS DataViz Extensions Demo:Visualizing IoT sensor data.
https://aps-iot-extensions-demo.autodesk.io
MIT License
11 stars 6 forks source link

How to effectively bring external real-time detected human body position data to animated sprites #15

Closed pp840814 closed 11 months ago

pp840814 commented 11 months ago

Hello, I am a student at Taiwan National Cheng Kung University and I am currently using APS to do digital twin research. I refer to a case study on Autodesk website. Name:Animating Sprite Viewables URL: (https://aps.autodesk.com/en/docs/dataviz/v1/developers_guide/examples/sprites/animate_sprites/)

But I am not a student majoring in engineering, I still don’t know how to effectively bring the human body position (X, Y) data detected by the sensor in real time into the animated sprite. Maybe it’s because I don’t know much about the case study of animated sprites, and I don’t know how to use the program code taught in the tutorial in this example on GITHUB.

I would like to ask all the experts and Autodesk engineers, how can I replace the current sprite with changing XY values ​​to achieve the position of the sprite imitating the human body? Does anyone have any successful cases that can be shared? Thank you.

yiskang commented 11 months ago

(Please don't share personal contact here. If you want to contact us, please use our official support channels.)

As we talked about in the mail, we don't have examples matching your request, unfortunately.

But from the Data Visualization extensions part, we can update the sprite viewable position like the one below to move the Sprite position by passing the new position value from your sprite imitating the human body., according to the section of Updating the sprite position in Animating Sprite Viewables. You can also get position diffs (movement data) between sprites on the human body and add values to sprites in the viewer to get the new positions.

dataVizExtn.invalidateViewables(spritesToUpdate, (viewable) => {
    return {
        // Move the viewable to a new location.
        position: { x: 10.0, y: 20.0, z: 30.0 },
    };
});

However, we have no idea about the human sprites. This is out of our support area, and we are not experts in this area. So, I think you should do the research yourself. Here would be some directions for your reference:

  1. Research how to get the position value from the sprite imitating the human body and pass it to your computer.
  2. Research how to pass the data to the APS viewer, especially to the Data Visualization extension.

Lastly, it's strongly recommended to learn website programming (JavaScript, CSS, HTML5) before writing your codes using the Data Visualization extension.

Cheers,