Show map and robot in VisualizationView at the same time on Android

asked 2016-06-23 01:16:31 -0500

mitchthebitch gravatar image

Hi,

I have followed the "make a map" tutorial on Github . Looking at the App (ROS Make a map (indigo)) on Google Play it shows a map and the robots position on the map.

I have successfully been able to display the map and the scan data individually but not together, as displayed on the screenshots on Google Play. I switch between between showing the map and scan data by using my mapView(VisualizationView): mapView.getCamera().jumToFrame("base_link") for scan data.

mapView.getCamera().jumpToFrame("map") for map.

I use the new onCreate(List<layer>) method to add layers to my VisualizationView like so:

ViewControlLayer viewControlLayer = new ViewControlLayer(this, cameraView, mapView, mainLayout, sideLayout, params);

    occupancyGridLayer = new OccupancyGridLayer("/map");
    laserScanLayer = new LaserScanLayer("/scan");
    robotLayer = new RobotLayer(ROBOT_FRAME);

    mapView.onCreate(Lists.<Layer>newArrayList(viewControlLayer, occupancyGridLayer, laserScanLayer, robotLayer));

For the moment i'm using gazebo to test my app.

Any idea why this results on only showing the map and scan data separately?

edit retag flag offensive close merge delete