Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Latest commit

 

History

History
47 lines (35 loc) · 2.34 KB

visualisation.md

File metadata and controls

47 lines (35 loc) · 2.34 KB

How to setup OpenCPN for visualisation:

(These instructions assume that you've already got local_pathfinding set up withing the src directory of a catkin workspace. Also, the catkin_make and source commands have been omitted.)

  1. Install OpenCPN
$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:opencpn/opencpn
$ sudo apt update
$ sudo apt install opencpn
  1. Configure OpenCPN to listen to UDP port localhost:65500

Press the Options button DeepinSkjermbilde_velg-område_20200125191044

Under connections, add a new UDP connection at 0.0.0.0:65500. Make sure to check Receive Input on this Port.

DeepinSkjermbilde_Navigator_20200125185322

Click OK and close the Options window. You can (but shouldn't have to) confirm that OpenCPN is listening by using netstat from the net-tools package:

$ sudo netstat -lp | grep opencpn
udp        0      0 0.0.0.0:65500           0.0.0.0:*                           14613/opencpn      
  1. Run the mock ROS nodes Run the following commands in (preferably in separate terminals, or use screen or tmux)
$ roscore
$ rosrun local_pathfinding MOCK_AIS.py
$ rosrun local_pathfinding MOCK_controller_and_boat.py
$ rosrun local_pathfinding MOCK_UDP_bridge.py
  1. Launch OpenCPN The boats should now be visible in the OpenCPN map. The yellow arrows are AIS units. DeepinSkjermbilde_Navigator_20200126225929

  2. BONUS: Configure OpenCPN to show wind direction and speed Open the Options window again, open the Plugins tab. Enable the Dashboard plugin, and hit Preferences. DeepinSkjermbilde_urxvt_20200126213457

Enable Show this dashboard, and add the True Wind Angle and Speed instrument. Remove the others. Hit OK, and finally hit OK again to close the Options window. DeepinSkjermbilde_urxvt_20200126213601