Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Map_Nav add layer error.. cannot draw map and set pose, lase and etc at same time #57

Open
HelloEgg opened this issue Jan 30, 2017 · 4 comments

Comments

@HelloEgg
Copy link

While I was trying to build map_nav, I noticed that add layer part has several errors.

As I touched mini view at upper right side (the occupancy layer preview), the map just disappears

and only arrows and paths appears.

I tried to fix this problem by loading separate "main activity" and two layouts.

Initially, the map appears in large scale and camera view appears in small scale (first layout, swaped view in xml file).

If I touch the camera preview at upper right side, MainActivity is loaded again with different layout (the one that is in git hub, camera view in larger scale and map in smaller scale).

This method succeeded in loading map, however, the arrow and paths did not appear.

If I press the map for a long time, arrows and paths appears and simultaneously, another arrow appears at the position I long pressed but map still disappears.

So far, I figured out that I cannot call "occupancylayout" class and "lase", "path", " initial pose" classes at the same time. In another words, if the GLsurfaceview draws laser, path and initial pose, occupancy class is not called.

However, occasionally, highly rarely, occupancylayer class is called and map is shown in a short amount of time.

Does anyone have solution to original problem or to my solution?
mapView.addLayer(occupancyGridLayer);
mapView.addLayer(laserScanLayer);
mapView.addLayer(pathLayer);
mapView.addLayer(mapPosePublisherLayer);
mapView.addLayer(initialPoseSubscriberLayer);
mapView.addLayer(viewControlLayer)

Thank you.

@ZhuJingquan
Copy link

Hi, @HelloEgg , in the make_a_map project I just using method mapView.addLayer() as follow:
mapView.addLayer(viewControlLayer); mapView.addLayer(occupancyGridLayer); mapView.addLayer(laserScanLayer); mapView.addLayer(robotLayer); mapView.addLayer(robotPose); mapView.addLayer(robotPath); mapView.addLayer(viewControlLayer);
but when I open the app ,I could only see the map layer, Is the problem same to your's? Have you solved the problem? Thank U~

@DavidHan008
Copy link

@ZhuJingquan hi how I can use the app make_a_map.
why my android do not have map?

@hsiaray
Copy link

hsiaray commented Sep 6, 2018

same question, in the real environment, only map or laser is shown.
but i can see them both when using gazebo...using the same app

@xiayouli0122
Copy link

same question, when i swap views, only map or laser can show,
how can i show them both?
help~

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

No branches or pull requests

5 participants