This is a proxy server that:
- read data from
rosbridge_server
via websocket using theroslib
package; - convert ROS message format into xviz;
- expose a
xviz
server via websocket using Uber's@xviz
pakcage.
-
both
rosbridge_server
androslib
are part of rosbridge_suite that allows interaction with ROS topics via websocket (which is a common streaming protocol for web services). -
XVIZ is a protocal (on top of websocket) for real time transfer and visualization of autonomy data opensourced by Uber.
You will need ROS installed in your system before doing the following steps. If you have not done so, refer to ROS documentation.
-
If you don't have rosbridge server installed (i.e.
rospack find rosbridge_server
returns nothing), install with:sudo apt install ros-<rosdistro>-rosbridge-suite
-
Start rosbridge server with:
roslaunch rosbridge_server rosbridge_websocket.launch
By default it listens on port
9090
for websocket connections. It also registers a node calledrosbridge_websocket
which you can verify byrosnode list
. -
Optional
: Testing rosbridge connection with a browser and Autoronto rosbag:# run the Autoronto rosbag: rosbag play _2019-01-23-13-28-36_imu_baselink-007.bag
Then open
websocket-client-test.html
in a browser. You should be able to see data coming from the topic/navsat/fix
. -
Start
rosbridge-xviz-connector
by:## you should have done yarn install to get dependencies before running yarn start ## or node ./index.js
The official XVIZ documentation has no clear description of their reference frames. However through playing around with test data, we discovered that XVIZ use a right handed reference frame with fixed orientation:
-
Origin of the reference frame is given by a
MapOrigin
defined by(latitude, longitude, altitude)
. -
Y-axis always point to North.
-
X-axis always point to East.
-
Z-axis always point up vertically.