Ask Your Question
0

Real-time map generate on web like a Rviz

asked 2019-03-26 20:04:11 -0600

justinROScolleage gravatar image

Hi there By the time I came to this question, I got a lot of great information on the internet, but the combination of 'rosbridge' and 'robot web tool' or 'ros2djs' is just displaying the generated map The I want to see the process of gmapping generating a map like rviz in real time on the web. Please let me know the solution for that. Please excuse my poor English.

edit retag flag offensive close merge delete

Comments

1

rviz is just subscribing to the /map topic and displaying it as gmapping generates updates. I haven't used the various ROS web tools that you mentioned, but you should be able to have them subscribe to the /map topic and display updates in real time too.

ahendrix gravatar imageahendrix ( 2019-03-26 21:09:09 -0600 )edit

thank you for your comment! Yes, I just wanna subscribe to the /map and display that on the web! But I cannot find the way to this.

justinROScolleage gravatar imagejustinROScolleage ( 2019-03-26 23:34:59 -0600 )edit
1

I don't know much about javascript or the ROS web tools, but some quick browsing of the documentation brought me to http://robotwebtools.org/jsdoc/ros2dj... , which seems to be able to subscribe to an occupancy grid and display it. I wasn't able to find a working example of that in a quick search, but there have been a lot of talks and documentation about the robot web tools packages, so I suspect that if you look hard enough, you'll be able to find something.

ahendrix gravatar imageahendrix ( 2019-03-26 23:50:42 -0600 )edit
1

Looks like I was a bit slow; @billy's comment includes a working example of the class that I linked to!

ahendrix gravatar imageahendrix ( 2019-03-26 23:52:26 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2019-03-26 23:49:05 -0600

billy gravatar image

updated 2019-03-26 23:52:35 -0600

See the answer to this question: https://answers.ros.org/question/3150...

I put working code up that displays the map in webbrowser locally or remotely.

Of course all that code started as samples from robotwebtools.org and ROS tutorials - but I admit I have not tried it while gmapping.

edit flag offensive delete link more

Comments

Thank you for @ahendrix@billy! I examined how to combine ROS and javascript to make a system, but I could not find a detailed tutorial. Please tell me the information you referenced when creating your own program.

justinROScolleage gravatar imagejustinROScolleage ( 2019-03-27 01:15:01 -0600 )edit
1

So you had me curious. Now I have tried it with gmapping and it works.But you need to tweek the code I linked to in earlier comment to continuously update the map. Add ", continuous : true" to the gridClient

var gridClient = new ROS2D.OccupancyGridClient({
  ros : ros,
  rootObject : viewer.scene,
  continuous : true
});

The map updates every 15 - 30 seconds on my old laptop running everything..

billy gravatar imagebilly ( 2019-03-27 02:00:30 -0600 )edit

This is all I was looking for! I can’t thank you enough:) you and @ahendrix made me notice OccupancyGrid. Thank you and so so much.

justinROScolleage gravatar imagejustinROScolleage ( 2019-03-27 03:10:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-26 20:04:11 -0600

Seen: 232 times

Last updated: Mar 26