Skip to content

Commit

Permalink
add sensor json
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Jul 25, 2023
1 parent c4474a8 commit 950a211
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions src/v2i-hub/CDASimAdapter/sensors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"id": "SomeID",
"type": "SematicLidar",
"location": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"orientation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"proj_string": "+proj=tmerc +lat_0=38.95197911150576 +lon_0=-77.14835128349988 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs"
},
{
"id": "SomeID2",
"type": "LIDAR",
"location": {
"x": 1.0,
"y": 2.0,
"z": 0.0
},
"orientation": {
"x": 23.0,
"y": 0.0,
"z": 0.0
},
"proj_string": "+proj=tmerc +lat_0=38.95197911150576 +lon_0=-77.14835128349988 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace CDASimAdapter {
}
public:
std::shared_ptr<CDASimConnection> connection;
std::string sensors_file_path = "/var/www/plugins/MAP/sensors.json";
std::string sensors_file_path = "../CDASimAdapter/sensors.json";


};
Expand Down Expand Up @@ -89,7 +89,7 @@ namespace CDASimAdapter {
location.Z = -77.149;
Json::Value sensorsJsonV;
ASSERT_EQ(connection->get_handshake_json("4566", "127.0.0.1", 4567, 4568, location, sensorsJsonV),
"{\n \"infrastructureId\" : 4566,\n \"location\" : {\n \"x\" : 1000.0,\n \"y\" : 38.954999999999998,\n \"z\" : -77.149000000000001\n },\n \"rxMessageIpAddress\" : \"127.0.0.1\",\n \"rxMessagePort\" : 4568,\n \"sensors\" : null,\n \"timeSyncPort\" : 4567\n}\n");
"{\n \"infrastructureId\" : \"4566\",\n \"location\" : {\n \"x\" : 1000.0,\n \"y\" : 38.954999999999998,\n \"z\" : -77.149000000000001\n },\n \"rxMessageIpAddress\" : \"127.0.0.1\",\n \"rxMessagePort\" : 4568,\n \"sensors\" : null,\n \"timeSyncPort\" : 4567\n}\n");
}

TEST_F( TestCARMASimulationConnection, carma_simulation_handshake) {
Expand Down

0 comments on commit 950a211

Please sign in to comment.