Using roslibjs to display GPS co-ordinate on Google Maps

by / Saturday, 07 November 2015 / Published in Google Maps API, GPS, Linux, Nvidia Jetson TK1, Robotic Operating System, Technical
gps_ros

 

 

 

 

 

Location of the implemented code.

 https://github.com/correll/advancedrobotics/blob/master/web_related/display_gps_google_maps.html

There are multiple ways to get this done.

Option 1) Run everything on a single ROS Node

  • Start roscore
  • Start the service that is publishing information
  • Start the ros bridge service: roslaunch rosbridge_server rosbridge_websocket.launch
  • Start a local python web server: python -m SimpleHTTPServer ( Start from the location where the html file exists )
  • You are good to go and browse the webpage.

Option 2) Run from multiple ROS nodes. Publish the topic from the master and start the server locally from the slave.

  • Start roscore
  • Start the service that is publishing information
  • Start the ros bridge service: roslaunch rosbridge_server rosbridge_websocket.launch
  • Connect to slave and update the ROS_IP and ROS_MASTER_URL
  • Check if you are able to read the published topic using rostopic echo nameofpublisher
  • If you are able to read it, just update the html file and open it in the browser.

Note: You need Internet connectivity on the PC from which you are accessing the Webpage as you are communicating with Google Maps Server.

 

Leave a Reply

TOP