mayacakmak / se2

Control interfaces for manipulating SE2 configurations
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Displaying a URDF in browser #4

Closed kavidey closed 4 years ago

kavidey commented 4 years ago

Since our meeting, I have implemented two more ways to display and interact with a URDF in a browser.

The first, is pure js, it uses a three.js (a 3d rendering library for javascript) and a URDF loader. This is the code: https://github.com/mayacakmak/se2/tree/urdf-visualization-testing/urdf-visualization/only-js

The second is a bit more complicated. When the website is initialized, it opens up anywhere a ton of ROS instances, each with their own visualizer, simulation, etc. Then, whenever a user visits the website, it assigns them a specific instance which they can interact with. The website also detects when they leave and opens up that instance for another user to interact with. The number of users we can support is limited by how many ros instances the server is capable of running at once, but it does open the door to having one gazebo simulation per user or something like that. This is the code: https://github.com/mayacakmak/se2/tree/urdf-visualization-testing/urdf-visualization/multiple-ros-instances. The backend is written in Flask with socket-io for communication and detecting when a user connects or disconnects.