Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit b56445c

Browse files
authored
Merge pull request #14 from Yang-Wu-Altran/master
1. Update README.md; 2. some coding improvement; 3. add lanes in sensor data visualization
2 parents e66f95a + 56d737d commit b56445c

File tree

14 files changed

+114
-104
lines changed

14 files changed

+114
-104
lines changed

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Visualization tool for OSI messages. This software serves as visualization tool for the current implementation of the [OSI (Open Simulation Interface)](https://github.com/OpenSimulationInterface/open-simulation-interface) mesages.The osi-visualizer supports to visualize the OSI GroundTruth and SensorData messages. It supports two independent visual channels with two different input types (file and network stream).
44

5+
![alt text](https://github.com/OpenSimulationInterface/osi-visualizer/tree/master/Resources/Images/Over_View.png "Over View")
6+
57
## General Information
68

79
Some software library dependencies are needed to run the osi-visualizer:
@@ -12,7 +14,7 @@ Some software library dependencies are needed to run the osi-visualizer:
1214
The osi-visualizer needs to use ZeroMQ libraries to complete the socket communication between different sensor / traffic / scenario simulators. Note that the C++ Bindings are required as well.
1315
* protobuf 2.6.1: https://github.com/google/protobuf
1416

15-
The required version of Open Simulation Interface (https://github.com/OpenSimulationInterface/open-simulation-interface.git) is referenced as a git submodule, so be sure to run git submodule init && git submodule update after cloning the osi-visualizer repository.
17+
The required version of [Open Simulation Interface](https://github.com/OpenSimulationInterface/open-simulation-interface.git) is referenced as a git submodule, so be sure to run `git submodule init` && `git submodule update` after cloning the osi-visualizer repository.
1618

1719
If the CMake build process does not automatically locate the required libraries, please use the usual CMake options to set the relevant CMake variables to the proper paths.
1820

@@ -32,10 +34,11 @@ Currently we strongly recommend users to use the osi-visualizer under Ubuntu Lin
3234
### From QtCreator:
3335
Open New Project -> CMakeLists.txt
3436

35-
3637
## Usage
3738
### Connection:
38-
The channel receives osi message from the network with specific IP address, Port number and data type.
39+
The channel receives osi message from the network with specific IP address and Port number, and shows up different data types.
40+
41+
![alt text](https://github.com/OpenSimulationInterface/osi-visualizer/tree/master/Resources/Images/Connection.png "Connection Setting")
3942

4043
### Playback:
4144
The channel receives osi message from the loaded file. The tool will check a header file of same name with a extension: .txth. If it doesn't exist, the tool will create one automatically for the first time.
@@ -45,24 +48,38 @@ Example: set it to 10 ms, each message will have 10 ms more delay for playing.
4548

4649
Besides the tool provides sending out osi message to network with specific port number.
4750

51+
![alt text](https://github.com/OpenSimulationInterface/osi-visualizer/tree/master/Resources/Images/Playback.png "Playback Setting")
52+
4853
### Save OSI Message:
49-
Log or cut out part of the osi message stream. Current the threshold is 100 osi messages. It can be saved to another osi file.
54+
Log or cut out part of the osi message stream and save it to another file. By default the threshold is 1000 osi messages. User can change this threshold in the config file.
5055

5156

5257
## Menu options
5358
### File Menu:
54-
"Play" -> play/pause Channel 1;
59+
`Play` -> play/pause Channel 1 by default.
60+
61+
`Python Compare` -> A standalone compare tool to compare two osi message file directly. By default, it takes the playback file from these two channels. It supports flexible selecting random file as well. Just put the python scripts into folder: ./Resources/Python/ before start this tool. Then all the scripts will be shown up in the "Python Scripts" select menu. The compare script should take the two osi files' full path as arguments. The compare result can be exported to a text file by clicking the "Export" button.
5562

56-
"Python Compare" -> A standalone compare tool to compare two osi message file directly. By default, it takes the playback file from these two channels. It supports flexible selecting random file as well. Just put the python scripts into folder: ./Resources/Python/ before start this tool. Then all the scripts will be shown up in the "Python Scripts" select menu. The compare script should take the two osi files' full path as arguments. The compare result can be exported to a text file by clicking the "Export" button.
63+
`Quit` -> Quit the visualizer.
5764

5865
### View Menu:
59-
"Combine Channels" -> Config two channels' "Play/Pause' button act simultaneously, or not. It can only be checked when the channels are at the same status: both "Play" or "Pause". By default, it is unchecked.
66+
`Combine Channels` -> Config two channels' "Play/Pause" simultaneously, or not. It can only be checked when the channels are at the same status: both "Play" or "Pause". By default, it is unchecked.
6067

61-
"Show Grid" -> Show up the grid in the canvas. By default, it is checked.
68+
`Show Grid` -> Show up the grid in the canvas. By default, it is checked.
6269

63-
"Show Object details" -> Select object from the Objects Overview tree. Show up the selected object's position, velocity and acceleration in another independent dialog. By default, it is checked.
70+
`Show Object details` -> Select object from the Objects Overview tree. Show up the selected object's position, velocity and acceleration in another independent dialog. By default, it is checked.
6471

6572
The others are self-explaining.
6673

6774
## Notice
6875
When playing large osi files, try to adapt the Delta Delay. Then the tool renders smoothly.
76+
77+
78+
## Run time screen shot
79+
Channel 1 plays an osi input file and sends out the osi message to port 5564 at the same time.
80+
Channel 2 receives osi message from port 5564 and shows up on the canvas.
81+
82+
![alt text](https://github.com/OpenSimulationInterface/osi-visualizer/tree/master/Resources/Images/Demo.png "Run time screen shot")
83+
84+
85+

Resources/Images/Connection.png

8.09 KB
Loading

Resources/Images/Demo.png

298 KB
Loading

Resources/Images/Over_View.png

201 KB
Loading

Resources/Images/Playback.png

13.7 KB
Loading
File renamed without changes.
File renamed without changes.

include/glwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions_4_3_Core
5858
bool eventFilter(QObject* obj, QEvent* event);
5959

6060
private:
61-
// void Zoom(float zoom);
61+
6262
void ResetObjectTextOrientations();
6363
void RenderObject(GLObject* object);
6464
void MouseWheel(QWheelEvent* event);

include/osiparser.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ class OsiParser : public QObject
3838

3939
private:
4040

41-
void ParseGroundtruth(Message& objectMessage,
42-
LaneMessage& laneMessage);
41+
void ParseGroundtruth(Message& objectMessage, LaneMessage& laneMessage);
4342

4443
void ParseGroundtruthMovingObject(Message& objectMessage,
4544
const osi::BaseMoving& baseObject,

include/osireader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class OsiReader: public QObject, public IMessageSource
6060

6161
void SendMessageLoop();
6262

63-
void ZMQSendOutMessage(const osi::SensorData& sd);
63+
void ZMQSendOutMessage(const std::string& message);
6464

6565

6666

0 commit comments

Comments
 (0)