siemens / ros-sharp

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particular Unity3D
Apache License 2.0
974 stars 370 forks source link

Map Visualization in Unity #144

Closed merci194 closed 5 years ago

merci194 commented 5 years ago

I have a question!

Here is my question: I'm trying to use the Occupancy grid message definition to visualize the 2D map i have made on Unity.As a reference I'm using the Laser Scan Subscriber and Visualizer scripts. These scripts on their own helped me understand a lot about how meshes in Unity are represented so thank you for that.(I'm a Unity Beginner) However i feel a little lost trying to depict the map in Unity.

For starters i dont understand how the visualiser would have to be implemented. What would be a good approach?

Should i try to create a maze with the Occupancy grid values? where occupied areas are walls and free areas are passages?

How do i go about aligning the origins of the map in ros to the one in Unity ,since unity uses a different coordinate system?Are there any specific coordinate transforms i have to take care of?

Or is it better to try a totally different approach such as trying to save and load a binary map?

Is there an implementation of the map visualisation already available or one you are working on?

I want to do this: I want to map with SLAM , localise and navigate a turtle bot on the map on Unity.During the course of my project i intend to implement Pure Localisation and Move Base visualisation on Unity as a sort of GUI frontend to ROS. I want to create a nice user interface for the turtlebot.The ROS# project has been really helpful in importing URDF files and visualising the Laser Scanner data.

For being able to do it, I wish ROS# had the following feature: Something like the visualiser scripts written for the Laser Scanner with the origins of both maps(in ROS and Unity) being aligned is what i'm looking for.It would really help someone new to Unity who'l looking to create graphical frontend applications to get started,especially since mesh generation can be a little time consuming to get into.I think it might also help rapid prototyping in industrial environments where people can sometimes be averse to using the terminal interface of Linux :)

MartinBischoff commented 5 years ago

Hi @merci194 ,

I'd suggest to model the occupancy grid data as a Unity Mesh. You can write your own Occupancy grid visualizer in an identical way as the laser scanner example. This is a beautiful training task for Unity beginners 😏

I shy away of adding further visualiziation example as for example for the an occupancy grid to the ROS# master, as it is very application-specific in terms of update rate, positioning, size and orientation, performance, coloring, shading, etc.

Please feel free to use this issue for exchanging Occupancy Grid visualization methods. Maybe @awesome-manuel @MischaRo @dwhit have something in their pocket...

MartinBischoff commented 5 years ago

Hi @merci194 any update on your Occupancy grid visualizer? How shall we proceed with this issue?

MartinBischoff commented 5 years ago

closing due to inactivity

Caveats commented 4 years ago

@merci194 Did you ever resolve this?