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

mitchthebitch's profile - activity

2016-12-15 06:15:47 -0500 received badge  Famous Question (source)
2016-07-16 03:16:07 -0500 received badge  Notable Question (source)
2016-06-29 07:21:09 -0500 received badge  Popular Question (source)
2016-06-23 01:24:57 -0500 asked a question Show map and robot in VisualizationView at the same time on Android

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?