Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shift now added to grid client to center on map #24

Merged
merged 6 commits into from
Apr 30, 2013
Merged

shift now added to grid client to center on map #24

merged 6 commits into from
Apr 30, 2013

Conversation

rctoris
Copy link
Contributor

@rctoris rctoris commented Apr 26, 2013

rctoris added a commit that referenced this pull request Apr 30, 2013
shift now added to grid client to center on map
@rctoris rctoris merged commit ac73c46 into GT-RAIL:devel Apr 30, 2013
@pirobot
Copy link

pirobot commented Jul 12, 2014

I'm still seeing an incorrect offset of my map relative to how it appears in RViz. I am using the CDN versions of ros2djs and nav2djs. Has this fixed been ported over to those versions or is it only available in a source install from Github?

@rctoris
Copy link
Contributor Author

rctoris commented Jul 14, 2014

We haven't pushed the latest nav2d or ros2d to the CDN servers year, sorry about that! I'll put it on my stack when I return from RSS!

@pirobot
Copy link

pirobot commented Jul 15, 2014

Thanks! No hurry. Just wanted to check. BTW, even when I checked out the source and built it myself, I still get the unwanted shift of my map in the viewer. I find I have to use the following variation of what is currently at the end of the nav2d.js file

// scale the viewer to fit the map
//that.viewer.shift(client.currentGrid.pose.position.x, client.currentGrid.pose.position.y);
that.viewer.scaleToDimensions(client.currentGrid.width, client.currentGrid.height);
  that.viewer.shift(client.currentGrid.x,client.currentGrid.y * Math.abs((client.currentGrid.x/client.currentGrid.y)));

});

Here I have commented out the first shift and modified the second shift to include a multiplication factor based on the ratio of the two components of the origin offsets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants