Skip to content

ARViz Scripts

dvargasfr edited this page Oct 8, 2019 · 5 revisions

Marker Detection

These scripts are based on the Microsoft MixedRealityToolkit SpectatorView project. More info about how these scripts work is explained here.

Multirobots Scene

Scripts for multirobots scene basically manage TFs transformations for publishing the position of the different frames. They are used to propperly synchronize visualizations according to robots current positions.

Render Data Visualization

These scripts are responsible for data types visualization. Each script manages an Augmented/Mixed Reality data type renderization. Data type visualizations available are included in TypesAvailable.cs (explained below). Each one of these scripts allow to edit on the Unity editor (Inspector tab) the topic name to subscribe in order to get the data information.

arviz_topics_inspector_img Unity inspector view of renderer topics scripts where topic names are entered

All of these scripts are included into an empty GameObject in User Interface Scene, as explained here.

User Interface Scene

  • Topics Visualizer: Script attached to SceneManager prefab. It is the main script to build the visualization environment. It starts creating a ROS2 node which get ropics/services available on the ROS2 system. Then it instantiates as many TopicBall prefabs as topics/services exist, and place them forming a wheel. Topic and type name texts are edited on each TopicBall based on the topic/service they represent. According to the wheel size, this script instantiates a TopicsInteractionZone prefab propperly resized. Both TopicBall and TopicsInteractionZone prefabs could be explicitly included by the user on the Unity editor (Inspector tab).

  • Topics Ball Manager: Script attached to TopicBall prefab. This script checks the availability of the visualization of a topic data type. This available info is stored in TypesAvailable.cs script. If a topic data type visualization is available, the 'type-panel' material color is edited, so topics/services with available and unavailable visualization are properly represented. Material applied on 'type-panel' whose data type visualization is available could be edited by the user on the Unity editor (Inspector tab). This script also manages the click input over the type-panel when is visible and the data visualization is available. Click action actives a boolean variable of the appropriate script that manages that data type visualization, and data type renderization starts.

  • Topics Group Behaviour: Script attached to TopicsInteractionZone prefab. It manages the interaction of the user with the topics/services wheel (rotate it up/down as explained in user interface running section), it also manages minimization/maximization of the wheel when user starts/stops a data visualization.

  • Types Available: This script contains the list of the data types whose visualization is available to render. It also provides a function to check from another scipt whether a data type visualize is available. Please update this list if a new data type renderization script is developed for User Interface.

Clone this wiki locally