Skip to content

Commit 2a03f97

Browse files
committed
添加第二个相机的类
1 parent 8322ddb commit 2a03f97

File tree

4 files changed

+48
-4
lines changed

4 files changed

+48
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ target_include_directories(D5Robot PUBLIC
3030
"${CMAKE_SOURCE_DIR}/global")
3131
target_link_libraries(D5Robot PUBLIC RMDMotor)
3232
target_link_libraries(D5Robot PUBLIC NatorMotor)
33-
target_link_libraries(D5Robot PUBLIC CameraTop)
33+
target_link_libraries(D5Robot PUBLIC Camera)
3434

3535
# 导出 DllAPI
3636
add_library(D5RbotApi SHARED src/DllApi.cpp)

lib/Galaxy/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ target_include_directories(GalaxyCamera PUBLIC
3333
target_link_libraries(GalaxyCamera GxAPI)
3434
target_link_libraries(GalaxyCamera ${OpenCV_LIBS})
3535

36-
# 上方相机类
37-
add_library(CameraTop src/CameraTop.cpp)
38-
target_link_libraries(CameraTop GalaxyCamera)
36+
add_library(Camera src/CameraTop.cpp src/CameraBot.cpp)
37+
target_link_libraries(Camera GalaxyCamera)

lib/Galaxy/include/CameraBot.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @file CameraBot.h
3+
* @author drawal ([email protected])
4+
* @brief
5+
* @version 0.1
6+
* @date 2024-11-28
7+
*
8+
* @copyright Copyright (c) 2024
9+
*
10+
*/
11+
#pragma once
12+
#include "GalaxyCamera.h"
13+
14+
namespace D5R {
15+
16+
class CameraBot : public GxCamera {
17+
18+
public:
19+
CameraBot(std::string id);
20+
~CameraBot();
21+
22+
private:
23+
double _mapParam;
24+
};
25+
} // namespace D5R

lib/Galaxy/src/CameraBot.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @file CameraBot.cpp
3+
* @author drawal ([email protected])
4+
* @brief
5+
* @version 0.1
6+
* @date 2024-11-28
7+
*
8+
* @copyright Copyright (c) 2024
9+
*
10+
*/
11+
#include "CameraBot.h"
12+
13+
namespace D5R {
14+
15+
CameraBot::CameraBot(std::string id) : GxCamera(id) {
16+
_mapParam = _mapParam = 0.00945084;
17+
}
18+
19+
CameraBot::~CameraBot() {}
20+
} // namespace D5R

0 commit comments

Comments
 (0)