Giter VIP home page Giter VIP logo

ros-osm-map-integration's Introduction

ROS-OSM-map-integration

This application is designed to display an OSM map with Leaflet in a browser, but while being connected to ROS, so it can display the position of the bot using a marker. You can also tap for a destination on the screen, and the app will set the position wanted in the ROS params. To make the routing from your current position to the point you've clicked on, please refer to my ROS module Routing-ROS-Module.

Image

A screenshot and the integration of the module on a car (Lab ai2, UPV)

Installation

This is not actually a ROS package, but it connects to ROS to get informations from GPS sensor, and uses some ROS functionnality, for instance ROS param, ROS topic, etc.

To allow this application to connect with ROS, you need to install RosBridge, who is kind of a bridge to connect some Javascript apps to the ROS core. To do so, please follow the tutorial here.

In order to launch rosbridge with the rest of your stuff, you can add this to your launch file :

<launch>
    <include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" > 
        <arg name="port" value="8080"/>
    </include>
</launch>

And then, open the page index.html with your favourite browser, and you're ready. You can even set the default page of your browser to it, so it opens automatically on startup.

Configuration

The configuration of the module can be modified just by changing the value at the top of the script.js file.

  • CONFIG_default_gps_topic_name : Set the name of the GPS topic the app is going to listen to
  • CONFIG_cycles_number : If the GPS is publishing really really fast, the app doesn't have the time to update the marker at each cycle, causing some delay. This parameters sets the number of cycles between each actualisation.
  • CONFIG_tile_source : Set the source of the tiles for the map. If you downloaded the maps of the area you want to move in, then you can set it to local. Else, set it to server.
  • CONFIG_tile_local_path : Path to the downloaded tiles
  • CONFIG_ROS_server_URI : Route to ROS server. It could be localhost or an IP.

Parameters

In the lab, we're working with two differents GPS, which are not publishing on the same topic and at the same frequency. So two parameters can be set :

  • /panel/gps_topic for the GPS topic's name. Example : /gps
  • /panel/nb_cycles for the number of cycles between each refreshing. Example : 20

You can set those in a ROS launch file, or set it using rosparam set, then refreshing the page in the browser by clicking on the refresh button.

ros-osm-map-integration's People

Contributors

sylvainar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.