Skip to content

Commit e52d808

Browse files
committed
New data set
1 parent 188782d commit e52d808

File tree

15 files changed

+62
-58
lines changed

15 files changed

+62
-58
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 3.16)
33
project(infinite_sense VERSION 1.0)
44

55
set(CMAKE_CXX_STANDARD 17)
6-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7-
set(CMAKE_CXX_EXTENSIONS OFF)
86

97
if (NOT CMAKE_BUILD_TYPE)
108
set(CMAKE_BUILD_TYPE Release)
@@ -13,6 +11,7 @@ if (NOT CMAKE_BUILD_TYPE)
1311
endif ()
1412

1513
add_subdirectory(infinite_sense_core)
14+
1615
add_executable(${PROJECT_NAME}_zmq_node
1716
example/ZMQ/zmq_main.cpp
1817
)

infinite_sense_core/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ add_subdirectory(third_party/serial)
2222
add_subdirectory(third_party/udp)
2323
add_library(${PROJECT_NAME} SHARED
2424
src/infinite_sense.cpp
25-
src/trigger_manager.cpp
26-
src/serial_manager.cpp
27-
src/cam_manager.cpp
25+
src/trigger.cpp
26+
src/serial.cpp
27+
src/cam.cpp
2828
src/image.cpp
29-
src/net_manager.cpp
29+
src/net.cpp
3030
src/messenger.cpp
3131
src/ptp.cpp
3232
include/ptp.h

infinite_sense_core/cmake/FindZeroMQ.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ if (NOT TARGET libzmq)
2929
endif ()
3030

3131
include(FindPackageHandleStandardArgs)
32-
# handle the QUIETLY and REQUIRED arguments and set ZeroMQ_FOUND to TRUE
33-
# if all listed variables are TRUE
3432
find_package_handle_standard_args(ZeroMQ DEFAULT_MSG ZeroMQ_LIBRARIES ZeroMQ_INCLUDE_DIRS)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class CamManger {
2121

2222
private:
2323
void Receive(void* handle, const std::string&) const;
24+
bool is_running_{false};
2425
std::vector<int> rets_;
2526
std::vector<void*> handles_;
2627
std::vector<std::thread> cam_threads_;
27-
bool is_running_{false};
2828
std::map<std::string, TriggerDevice> params_;
2929
};
3030
} // namespace infinite_sense

infinite_sense_core/include/data.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#pragma once
2+
#include <cstdint>
3+
#include <string>
4+
#include "image.h"
5+
namespace infinite_sense {
6+
struct ImuData {
7+
uint64_t time_stamp_us;
8+
float temperature;
9+
std::string name;
10+
float a[3];
11+
float g[3];
12+
float q[4];
13+
};
14+
15+
struct CamData {
16+
uint64_t time_stamp_us;
17+
std::string name;
18+
GMat image;
19+
};
20+
21+
struct LaserData {
22+
uint64_t time_stamp_us;
23+
std::string name;
24+
};
25+
26+
struct GPSData {
27+
uint64_t time_stamp_us;
28+
uint64_t gps_stamp_us;
29+
uint64_t gps_stamp_us_trigger;
30+
std::string name;
31+
float latitude;
32+
float longitude;
33+
};
34+
35+
enum TriggerDevice {
36+
IMU_1 = 0, // internal imu
37+
IMU_2 = 1, // external imu
38+
CAM_1 = 2, // camera 1
39+
CAM_2 = 3, // camera 2
40+
CAM_3 = 4, // camera 3
41+
CAM_4 = 5, // camera 4
42+
LASER = 6, // laser pps
43+
GPS = 7, // gps pps
44+
};
45+
}

infinite_sense_core/include/infinite_sense.h

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,10 @@
11
#pragma once
22
#include "log.h"
3-
#include "image.h"
3+
#include "data.h"
44
#include "messenger.h"
5-
namespace infinite_sense {
6-
7-
struct ImuData {
8-
uint64_t time_stamp_us;
9-
float temperature;
10-
std::string name;
11-
float a[3];
12-
float g[3];
13-
float q[4];
14-
};
15-
16-
struct CamData {
17-
uint64_t time_stamp_us;
18-
std::string name;
19-
GMat image;
20-
};
215

22-
struct LaserData {
23-
uint64_t time_stamp_us;
24-
std::string name;
25-
};
26-
27-
struct GPSData {
28-
uint64_t time_stamp_us;
29-
uint64_t gps_stamp_us;
30-
uint64_t gps_stamp_us_trigger;
31-
std::string name;
32-
float latitude;
33-
float longitude;
34-
};
6+
namespace infinite_sense {
357

36-
enum TriggerDevice {
37-
IMU_1 = 0, // internal imu
38-
IMU_2 = 1, // external imu
39-
CAM_1 = 2, // camera 1
40-
CAM_2 = 3, // camera 2
41-
CAM_3 = 4, // camera 3
42-
CAM_4 = 5, // camera 4
43-
LASER = 6, // laser pps
44-
GPS = 7, // gps pps
45-
};
468
class NetManager;
479
class SerialManager;
4810
class CamManger;
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cam_manager.h"
1+
#include "cam.h"
22
#include "infinite_sense.h"
33
#include "MvCameraControl.h"
44
#include "log.h"

0 commit comments

Comments
 (0)