ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Move map in nav2djs

asked 2014-05-02 09:42:05 -0500

Hansg91 gravatar image

Hey,

I am showing the current map in a nav2djs widget, however it is translated off canvas. How can I center it in the canvas, or preferably, how can I move the map in the canvas with the mouse? This pull request suggests it is fixed, but I am not seeing the correct map.

image description

Best regards, Hans

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-05-02 10:17:13 -0500

rtoris288 gravatar image

The referenced pull request actually results in the map the way you are looking at it. The way it works is the map gets centered at the 0,0 location. Since your map 0,0 is the corner, that is what the center is. Currently there is no pan (although it could be added), but you can manually offset the map position upon creation:

https://github.com/RobotWebTools/ros2...

edit flag offensive delete link more

Comments

Ah thank you, that clears some stuff up. I tried that and it indeed worked, but why does that even not exist for a NAV2D.OccupancyGridClientNav object? Seems logical for it to exist there too. Thank you for the quick response by the way.

Hansg91 gravatar image Hansg91  ( 2014-05-02 10:43:43 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-05-02 09:42:05 -0500

Seen: 346 times

Last updated: May 02 '14