update directory structure
This commit is contained in:
parent
e6cd53f86b
commit
c8cb7fcc2b
@ -20,10 +20,10 @@
|
||||
</Camera>
|
||||
|
||||
<DexHand>
|
||||
<!-- <RH56DFTP id="hand1" default_force="500" default_speed="500" ip_address="10.148.108.115" port="6000">-->
|
||||
<!-- <RH56DFTP id="hand1" default_force="500" default_speed="500" ip_address="192.168.1.223" port="6000">-->
|
||||
<!-- <Freedom order="01" default_force="500" default_speed="500" />-->
|
||||
<!-- </RH56DFTP>-->
|
||||
<!-- <RH56DFTP id="hand2" default_force="500" default_speed="500" ip_address="10.148.108.113" port="6000">-->
|
||||
<!-- <RH56DFTP id="hand2" default_force="500" default_speed="500" ip_address="192.168.1.224" port="6000">-->
|
||||
<!-- <Freedom order="01" default_force="500" default_speed="500" />-->
|
||||
<!-- </RH56DFTP>-->
|
||||
</DexHand>
|
||||
@ -32,44 +32,44 @@
|
||||
<!-- <LeftArm id="left_arm" devtype="ti5Robot" />-->
|
||||
<!-- <RightArm />-->
|
||||
<!-- <Neck/>-->
|
||||
<Humanoid id="hc01" dof="14"
|
||||
urdf="/home/lgv/cmvr/cmvr-es/config/robot_description/hc_description/dual_arm.urdf"
|
||||
baseLink="PELVIS_S"
|
||||
jointNames="L_SHOULDER_P,L_SHOULDER_R,L_SHOULDER_Y,L_ELBOW_R,L_WRIST_P,L_WRIST_Y,L_WRIST_R,R_SHOULDER_P,R_SHOULDER_R,R_SHOULDER_Y,R_ELBOW_R,R_WRIST_P,R_WRIST_Y,R_WRIST_R"
|
||||
linkNames="PELVIS_S,L_SHOULDER_P_S,L_SHOULDER_R_S,L_SHOULDER_Y_S,L_ELBOW_R_S,L_WRIST_P_S,L_WRIST_Y_S,L_WRIST_R_S,R_SHOULDER_P_S,R_SHOULDER_R_S,R_SHOULDER_Y_S,R_ELBOW_R_S,R_WRIST_P_S,R_WRIST_Y_S,R_WRIST_R_S,R_FINGER_TIP,R_CAM"
|
||||
bufferSize="50"
|
||||
verbose="false">
|
||||
<CanManger id="" devId="">
|
||||
<LeftArmCan id = " " devId = " " channelId ="0" enable="true" toolFrame="L_FINGER_TIP">
|
||||
<Motor id="23" jointName="L_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="24" jointName="L_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="25" jointName="L_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="26" jointName="L_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="27" jointName="L_WRIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="28" jointName="L_WRIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="1" jointName="L_WRIST_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
</LeftArmCan>
|
||||
<RightArmCan id = " " devId = " " channelId ="1" enable="true" toolFrame="R_FINGER_TIP">
|
||||
<Motor id="16" jointName="R_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="17" jointName="R_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="18" jointName="R_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="19" jointName="R_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="20" jointName="R_WRIST_P" limitQLb="-3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="21" jointName="R_WRIST_Y" limitQLb="-1.102" limitQUb="1.02" limitQd="3.0"/>
|
||||
<Motor id="22" jointName="R_WRIST_R" limitQLb="-0.293" limitQUb="1.57079" limitQd="3.0"/>
|
||||
</RightArmCan>
|
||||
<HeadCan id = " " devId = " " channelId ="2" enable="true">
|
||||
<Motor id="32" jointName="HEAD_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="30" jointName="HEAD_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="31" jointName="HEAD_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
</HeadCan>
|
||||
<WaistCan id = " " devId = " " channelId ="3" enable="false">
|
||||
<Motor id="14" jointName="WAIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
<Motor id="15" jointName="WAIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
|
||||
</WaistCan>
|
||||
</CanManger>
|
||||
<!-- <Humanoid id="hc01" dof="14"-->
|
||||
<!-- urdf="/home/lgv/cmvr/cmvr-es/config/robot_description/hc_description/dual_arm.urdf"-->
|
||||
<!-- baseLink="PELVIS_S"-->
|
||||
<!-- jointNames="L_SHOULDER_P,L_SHOULDER_R,L_SHOULDER_Y,L_ELBOW_R,L_WRIST_P,L_WRIST_Y,L_WRIST_R,R_SHOULDER_P,R_SHOULDER_R,R_SHOULDER_Y,R_ELBOW_R,R_WRIST_P,R_WRIST_Y,R_WRIST_R"-->
|
||||
<!-- linkNames="PELVIS_S,L_SHOULDER_P_S,L_SHOULDER_R_S,L_SHOULDER_Y_S,L_ELBOW_R_S,L_WRIST_P_S,L_WRIST_Y_S,L_WRIST_R_S,R_SHOULDER_P_S,R_SHOULDER_R_S,R_SHOULDER_Y_S,R_ELBOW_R_S,R_WRIST_P_S,R_WRIST_Y_S,R_WRIST_R_S,R_FINGER_TIP,R_CAM"-->
|
||||
<!-- bufferSize="50"-->
|
||||
<!-- verbose="false">-->
|
||||
<!-- <CanManger id="" devId="">-->
|
||||
<!-- <LeftArmCan id = " " devId = " " channelId ="0" enable="true" toolFrame="L_FINGER_TIP">-->
|
||||
<!-- <Motor id="23" jointName="L_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="24" jointName="L_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="25" jointName="L_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="26" jointName="L_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="27" jointName="L_WRIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="28" jointName="L_WRIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="1" jointName="L_WRIST_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- </LeftArmCan>-->
|
||||
<!-- <RightArmCan id = " " devId = " " channelId ="1" enable="true" toolFrame="R_FINGER_TIP">-->
|
||||
<!-- <Motor id="16" jointName="R_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="17" jointName="R_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="18" jointName="R_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="19" jointName="R_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="20" jointName="R_WRIST_P" limitQLb="-3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="21" jointName="R_WRIST_Y" limitQLb="-1.102" limitQUb="1.02" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="22" jointName="R_WRIST_R" limitQLb="-0.293" limitQUb="1.57079" limitQd="3.0"/>-->
|
||||
<!-- </RightArmCan>-->
|
||||
<!-- <HeadCan id = " " devId = " " channelId ="2" enable="false">-->
|
||||
<!-- <Motor id="32" jointName="HEAD_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="30" jointName="HEAD_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="31" jointName="HEAD_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- </HeadCan>-->
|
||||
<!-- <WaistCan id = " " devId = " " channelId ="3" enable="false">-->
|
||||
<!-- <Motor id="14" jointName="WAIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- <Motor id="15" jointName="WAIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
|
||||
<!-- </WaistCan>-->
|
||||
<!-- </CanManger>-->
|
||||
|
||||
</Humanoid>
|
||||
<!-- </Humanoid>-->
|
||||
</Robot>
|
||||
|
||||
<BioHead>
|
||||
@ -90,11 +90,11 @@
|
||||
|
||||
<Microphone>
|
||||
<!-- <ffmpegMicPhone id="mic1" alsa="hw:0" channels="2" sampleRate="44100" volume="80"/>-->
|
||||
<!-- <ffmpegMicPhone id="mic2" alsa="hw:1" channels="1" sampleRate="44100" volume="80"/>-->
|
||||
<ffmpegMicPhone id="mic2" alsa="hw:1" channels="1" sampleRate="44100" volume="80"/>
|
||||
</Microphone>
|
||||
|
||||
<Speaker>
|
||||
<!-- <ffmpegSpeaker id="spk1" serial="" alas="hw:0,0" channels="2" sampleRate="44100" softResample="1" latency="500000" volume="80"/>-->
|
||||
<ffmpegSpeaker id="spk1" serial="" alas="hw:0,0" channels="2" sampleRate="44100" softResample="1" latency="50000" volume="80"/>
|
||||
</Speaker>
|
||||
|
||||
<Canbus>
|
||||
|
||||
@ -77,4 +77,12 @@ target_link_libraries(robot_wrapper PRIVATE
|
||||
ccd
|
||||
fcl
|
||||
cmvr_es::device_manager
|
||||
${OpenCV_LIBS})
|
||||
${OpenCV_LIBS})
|
||||
|
||||
|
||||
add_executable(moveL moveL.cpp)
|
||||
target_link_libraries(moveL PRIVATE cmvr_es::utils)
|
||||
|
||||
add_executable(speedL speedL.cpp)
|
||||
target_include_directories(speedL PRIVATE ${GLOG_INCLUDE_DIRS})
|
||||
target_link_libraries(speedL PRIVATE cmvr_es::utils ${GLOG_LIBRARIES})
|
||||
@ -14,7 +14,7 @@
|
||||
#include <iomanip>
|
||||
|
||||
#include "utils/dynamics/robot.h"
|
||||
#include "utils/controller/cartesian_controller.h"
|
||||
#include "utils/solver/qp_solver.h"
|
||||
|
||||
// ---------- CONFIG ---------------------------------------------------------
|
||||
constexpr int DOF = 14; // robot DOF
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#include "utils/dynamics/robot.h"
|
||||
#include "utils/controller/cartesian_controller.h"
|
||||
#include "utils/solver/qp_solver.h"
|
||||
#include <Eigen/Dense>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#include "utils/dynamics/robot.h"
|
||||
#include "utils/controller/cartesian_controller.h"
|
||||
#include "utils/solver/qp_solver.h"
|
||||
|
||||
constexpr int DOF = 14;
|
||||
using RobotT = cmvr::dyn::Robot<DOF>;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#include "jsoncpp/json/json.h"
|
||||
#include "abstract_device.h"
|
||||
#include "utils/controller/cartesian_controller.h"
|
||||
#include "utils/solver/qp_solver.h"
|
||||
#include "cmvr/msgs/geometry.pb.h"
|
||||
#include "cmvr/msgs/motor.pb.h"
|
||||
|
||||
|
||||
14
include/hardware_manager/hardware_factory.h
Normal file
14
include/hardware_manager/hardware_factory.h
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Created by linbo on 2025/10/21.
|
||||
//
|
||||
|
||||
#ifndef CMVR_ES_HARDWARE_FACTORY_H
|
||||
#define CMVR_ES_HARDWARE_FACTORY_H
|
||||
|
||||
|
||||
class hardware_factory
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
#endif //CMVR_ES_HARDWARE_FACTORY_H
|
||||
14
include/hardware_manager/hardware_manager.h
Normal file
14
include/hardware_manager/hardware_manager.h
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Created by linbo on 2025/10/21.
|
||||
//
|
||||
|
||||
#ifndef CMVR_ES_HARDWARE_MANAGER_H
|
||||
#define CMVR_ES_HARDWARE_MANAGER_H
|
||||
|
||||
|
||||
class hardware_manager
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
#endif //CMVR_ES_HARDWARE_MANAGER_H
|
||||
@ -6,7 +6,7 @@
|
||||
#define GRPC_CAMERA_SERVICE_H
|
||||
|
||||
#include "cmvr/api/camera_service.grpc.pb.h"
|
||||
#include "../utils/base/grpc_utils.h"
|
||||
#include "../../utils/base/grpc_utils.h"
|
||||
#include "device_manager/device_manager.h"
|
||||
|
||||
namespace cmvr::service {
|
||||
@ -6,7 +6,7 @@
|
||||
#define GRPC_DEXHAND_SERVICE_H
|
||||
|
||||
#include "cmvr/api/dexhand_service.grpc.pb.h"
|
||||
#include "../utils/base/grpc_utils.h"
|
||||
#include "../../utils/base/grpc_utils.h"
|
||||
#include "device_manager/device_manager.h"
|
||||
namespace cmvr::service {
|
||||
class gRPCDexHandServiceImpl final: public api::DexHandService::Service {
|
||||
@ -7,7 +7,7 @@
|
||||
#define GRPC_MICROPHONE_SERVICE_H
|
||||
#include "cmvr/api/microphone_service.grpc.pb.h"
|
||||
#include "device_manager/device_manager.h"
|
||||
#include "../utils/base/grpc_utils.h"
|
||||
#include "../../utils/base/grpc_utils.h"
|
||||
|
||||
namespace cmvr::service
|
||||
{
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "cmvr/api/speaker_service.grpc.pb.h"
|
||||
#include "device_manager/device_manager.h"
|
||||
#include "../utils/base/grpc_utils.h"
|
||||
#include "../../utils/base/grpc_utils.h"
|
||||
|
||||
namespace cmvr::service {
|
||||
class gRPCSpeakerServiceImpl: public api::SpeakerService::Service {
|
||||
@ -6,7 +6,7 @@
|
||||
#define GRPC_SYSTEM_SERVICE_H
|
||||
|
||||
#include "cmvr/api/system_service.grpc.pb.h"
|
||||
#include "../utils/base/grpc_utils.h"
|
||||
#include "../../utils/base/grpc_utils.h"
|
||||
#include "device_manager/device_manager.h"
|
||||
|
||||
namespace cmvr::service
|
||||
@ -1,8 +1,8 @@
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(hardware)
|
||||
add_subdirectory(hardware_manager)
|
||||
add_subdirectory(devices)
|
||||
add_subdirectory(monitor)
|
||||
add_subdirectory(device_manager)
|
||||
add_subdirectory(service)
|
||||
add_subdirectory(http)
|
||||
add_subdirectory(controller)
|
||||
@ -6,7 +6,7 @@
|
||||
#define CMVR_ES_HUMANOID_ROBOT_H
|
||||
|
||||
#include "devices/abstract_robot.h"
|
||||
#include "utils/controller/cartesian_controller.h"
|
||||
#include "utils/solver/qp_solver.h"
|
||||
#include "utils/base/os.h"
|
||||
#include "utils/base/timer.h"
|
||||
#include "utils/base/ring_buffer.h"
|
||||
|
||||
@ -55,7 +55,7 @@ TEST(HumanoidRobotTest,GetState) {
|
||||
|
||||
TEST(HumanoidRobotTest,MyRobotTest) {
|
||||
|
||||
std::string config_path = "/home/lgv/cmvr/cmvr-es/config/cabin_robot.xml";
|
||||
std::string config_path = "/home/linbo/newProject/cmvr-es/config/cabin_robot.xml";
|
||||
const XmlNode config(config_path);
|
||||
|
||||
if (!config.hasChild("DeviceManager")){
|
||||
@ -75,29 +75,24 @@ TEST(HumanoidRobotTest,MyRobotTest) {
|
||||
// robot->calibrateZeroQ("R_WRIST_R");
|
||||
//
|
||||
cmd = {
|
||||
{"L_SHOULDER_P", 0.0},
|
||||
{"L_SHOULDER_R", 0.0},
|
||||
{"L_SHOULDER_Y", 0.0},
|
||||
{"L_ELBOW_R", 0.0},
|
||||
{"L_WRIST_P", 0.0},
|
||||
{"L_WRIST_Y", 0.0},
|
||||
{"L_WRIST_R", 0.0},
|
||||
// {"L_SHOULDER_P", 0.0},
|
||||
// {"L_SHOULDER_R", 0.0},
|
||||
// {"L_SHOULDER_Y", 0.0},
|
||||
// {"L_ELBOW_R", 0.0},
|
||||
// {"L_WRIST_P", 0.0},
|
||||
// {"L_WRIST_Y", 0.2},
|
||||
// {"L_WRIST_R", 0.0},
|
||||
//
|
||||
// {"R_SHOULDER_P", 0.0}
|
||||
// {"R_SHOULDER_R", 0.0},
|
||||
// {"R_SHOULDER_Y", 0.0},
|
||||
// {"R_ELBOW_R", 0.0},
|
||||
// {"R_WRIST_P", 0.0},
|
||||
// {"R_WRIST_Y", 0.0},
|
||||
// {"R_WRIST_R", 0.0},
|
||||
{"R_WRIST_Y", 0.0},
|
||||
{"R_WRIST_R", 0.0},
|
||||
|
||||
// {"WAIST_P" ,0.0},
|
||||
// {"WAIST_Y" ,0.0},
|
||||
|
||||
{"HEAD_P",0.0},
|
||||
{"HEAD_Y",0.0},
|
||||
{"HEAD_R",0.0},
|
||||
|
||||
};
|
||||
robot->moveJ(cmd,0.8);
|
||||
|
||||
@ -545,7 +540,7 @@ TEST(HumanoidRobotTest, SpeedJTest) {
|
||||
auto robot = dmgr.getDevice<AbstractRobot>("hc01");
|
||||
|
||||
// 设置目标关节和相关参数
|
||||
std::string joint_name = "L_WRIST_R"; // 目标关节名
|
||||
std::string joint_name = "R_WRIST_R"; // 目标关节名
|
||||
RobotJointIndexDirection dir = RobotJointIndexDirection::Y_NEGATIVE; // 方向
|
||||
double vel = -0.1; // 速度 (rad/s)
|
||||
double acc = 1; // 加速度 (rad/s²)
|
||||
@ -553,6 +548,8 @@ TEST(HumanoidRobotTest, SpeedJTest) {
|
||||
try {
|
||||
// 调用 speedJ 函数进行关节运动
|
||||
robot->speedJ(joint_name, dir, vel, acc);
|
||||
std::this_thread::sleep_for(std::chrono::seconds(3));
|
||||
robot->speedJ(joint_name, dir, 0, acc);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
LOG(ERROR) << "speedJ test failed: " << e.what();
|
||||
|
||||
11
src/hardware_manager/CMakeLists.txt
Normal file
11
src/hardware_manager/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
add_library(hardware_manager SHARED
|
||||
hardware_factory.cpp
|
||||
hardware_manager.cpp
|
||||
|
||||
)
|
||||
|
||||
target_include_directories(hardware_manager PUBLIC
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
add_library(cmvr_es::hardware_manager ALIAS hardware_manager)
|
||||
5
src/hardware_manager/hardware_factory.cpp
Normal file
5
src/hardware_manager/hardware_factory.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by linbo on 2025/10/21.
|
||||
//
|
||||
|
||||
#include "hardware_manager/hardware_factory.h"
|
||||
5
src/hardware_manager/hardware_manager.cpp
Normal file
5
src/hardware_manager/hardware_manager.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by linbo on 2025/10/21.
|
||||
//
|
||||
|
||||
#include "hardware_manager/hardware_manager.h"
|
||||
18
src/main.cpp
18
src/main.cpp
@ -9,17 +9,17 @@
|
||||
#include <glog/logging.h>
|
||||
#include "device_manager/device_manager.h"
|
||||
#include "monitor/monitor_manager.h"
|
||||
#include "service/grpc_camera_service.h"
|
||||
#include "service/grpc_system_service.h"
|
||||
#include "service/grpc_speaker_service.h"
|
||||
#include "service/grpc_microphone_service.h"
|
||||
#include "service/grpc_dexhand_service.h"
|
||||
#include "service/grpc_service/grpc_camera_service.h"
|
||||
#include "service/grpc_service/grpc_system_service.h"
|
||||
#include "service/grpc_service/grpc_speaker_service.h"
|
||||
#include "service/grpc_service/grpc_microphone_service.h"
|
||||
#include "service/grpc_service/grpc_dexhand_service.h"
|
||||
#include "utils/base/logger.h"
|
||||
#include "service/grpc_head_service.h"
|
||||
#include "service/grpc_humanoid_robot_service.h"
|
||||
#include "service/grpc_hlc_service.h"
|
||||
#include "service/grpc_service/grpc_head_service.h"
|
||||
#include "service/grpc_service/grpc_humanoid_robot_service.h"
|
||||
#include "service/grpc_service/grpc_hlc_service.h"
|
||||
|
||||
#include "http/httpclient.h"
|
||||
#include "service/http_service/httpclient.h"
|
||||
#include "json/json.h"
|
||||
|
||||
void runServer(const XmlNode &cfg){
|
||||
|
||||
@ -1,87 +1,2 @@
|
||||
add_library(service
|
||||
grpc_camera_service.cpp
|
||||
grpc_system_service.cpp
|
||||
grpc_speaker_service.cpp
|
||||
grpc_microphone_service.cpp
|
||||
grpc_head_service.cpp
|
||||
grpc_dexhand_service.cpp
|
||||
grpc_humanoid_robot_service.cpp
|
||||
grpc_hlc_service.cpp
|
||||
)
|
||||
|
||||
target_include_directories(service PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(service PRIVATE
|
||||
proto-objects
|
||||
gRPC::grpc++
|
||||
protobuf::libprotobuf
|
||||
cmvr_es::device_manager
|
||||
cmvr_es::ctrl::controller
|
||||
)
|
||||
|
||||
add_library(cmvr_es::service ALIAS service)
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
# Unit test
|
||||
# --------------------------------------------------------
|
||||
find_package(glog REQUIRED)
|
||||
find_package(protobuf REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(fcl REQUIRED)
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/include
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/lib
|
||||
)
|
||||
|
||||
|
||||
add_executable(grpc_humanoid_robot_client_test
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/grpc_humanoid_robot_client_test.cpp
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(grpc_humanoid_robot_client_test
|
||||
PRIVATE
|
||||
cmvr_es::device::canbus
|
||||
cmvr_es::device::ti5motor
|
||||
cmvr_es::device::humanoid_robot
|
||||
gtest
|
||||
gtest_main
|
||||
pthread
|
||||
glog::glog
|
||||
proto-objects
|
||||
ccd
|
||||
fcl
|
||||
cmvr_es::device_manager
|
||||
${OpenCV_LIBS}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
add_executable(grpc_hlc_client_test
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/grpc_hlc_client_test.cpp
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(grpc_hlc_client_test
|
||||
PRIVATE
|
||||
cmvr_es::device::canbus
|
||||
cmvr_es::device::ti5motor
|
||||
cmvr_es::device::humanoid_robot
|
||||
gtest
|
||||
gtest_main
|
||||
pthread
|
||||
glog::glog
|
||||
proto-objects
|
||||
ccd
|
||||
fcl
|
||||
cmvr_es::device_manager
|
||||
${OpenCV_LIBS}
|
||||
)
|
||||
|
||||
add_subdirectory(grpc_service)
|
||||
add_subdirectory(http_service)
|
||||
87
src/service/grpc_service/CMakeLists.txt
Normal file
87
src/service/grpc_service/CMakeLists.txt
Normal file
@ -0,0 +1,87 @@
|
||||
add_library(service
|
||||
grpc_camera_service.cpp
|
||||
grpc_system_service.cpp
|
||||
grpc_speaker_service.cpp
|
||||
grpc_microphone_service.cpp
|
||||
grpc_head_service.cpp
|
||||
grpc_dexhand_service.cpp
|
||||
grpc_humanoid_robot_service.cpp
|
||||
grpc_hlc_service.cpp
|
||||
)
|
||||
|
||||
target_include_directories(service PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries(service PRIVATE
|
||||
proto-objects
|
||||
gRPC::grpc++
|
||||
protobuf::libprotobuf
|
||||
cmvr_es::device_manager
|
||||
cmvr_es::ctrl::controller
|
||||
)
|
||||
|
||||
add_library(cmvr_es::service ALIAS service)
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
# Unit test
|
||||
# --------------------------------------------------------
|
||||
find_package(glog REQUIRED)
|
||||
find_package(protobuf REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(fcl REQUIRED)
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/include
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/lib
|
||||
)
|
||||
|
||||
|
||||
add_executable(grpc_humanoid_robot_client_test
|
||||
grpc_humanoid_robot_client_test.cpp
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(grpc_humanoid_robot_client_test
|
||||
PRIVATE
|
||||
cmvr_es::device::canbus
|
||||
cmvr_es::device::ti5motor
|
||||
cmvr_es::device::humanoid_robot
|
||||
gtest
|
||||
gtest_main
|
||||
pthread
|
||||
glog::glog
|
||||
proto-objects
|
||||
ccd
|
||||
fcl
|
||||
cmvr_es::device_manager
|
||||
${OpenCV_LIBS}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
add_executable(grpc_hlc_client_test
|
||||
grpc_hlc_client_test.cpp
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(grpc_hlc_client_test
|
||||
PRIVATE
|
||||
cmvr_es::device::canbus
|
||||
cmvr_es::device::ti5motor
|
||||
cmvr_es::device::humanoid_robot
|
||||
gtest
|
||||
gtest_main
|
||||
pthread
|
||||
glog::glog
|
||||
proto-objects
|
||||
ccd
|
||||
fcl
|
||||
cmvr_es::device_manager
|
||||
${OpenCV_LIBS}
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by xtkuang on 2025/6/1.
|
||||
//
|
||||
|
||||
#include "service/grpc_camera_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_camera_service.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace cmvr::service;
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by linbo on 2025/7/3.
|
||||
//
|
||||
|
||||
#include "service/grpc_dexhand_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_dexhand_service.h"
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
@ -1,4 +1,4 @@
|
||||
#include "service/grpc_head_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_head_service.h"
|
||||
|
||||
#include "cmvr/api/biohead_service.grpc.pb.h"
|
||||
#include "device_manager/device_manager.h"
|
||||
@ -4,7 +4,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include <glog/logging.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include "service/grpc_hlc_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_hlc_service.h"
|
||||
#include "google/protobuf/timestamp.pb.h"
|
||||
#include <iostream>
|
||||
#include <google/protobuf/util/time_util.h>
|
||||
@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
|
||||
#include "service/grpc_hlc_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_hlc_service.h"
|
||||
#include <google/protobuf/util/time_util.h>
|
||||
#include "robot/humanoid_robot/humanoid_robot.h"
|
||||
#include "controller/touch_controller.h"
|
||||
@ -5,7 +5,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include <glog/logging.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include "service/grpc_humanoid_robot_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_humanoid_robot_service.h"
|
||||
#include "google/protobuf/timestamp.pb.h"
|
||||
#include <iostream>
|
||||
#include <google/protobuf/util/time_util.h>
|
||||
@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
|
||||
#include "service/grpc_humanoid_robot_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_humanoid_robot_service.h"
|
||||
#include <google/protobuf/util/time_util.h>
|
||||
|
||||
#include "cmvr/api/humanoid_robot_command.pb.h"
|
||||
@ -3,7 +3,7 @@
|
||||
// Created by xtkuang on 2025/6/13.
|
||||
//
|
||||
|
||||
#include "service/grpc_microphone_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_microphone_service.h"
|
||||
using namespace std;
|
||||
using namespace cmvr::device;
|
||||
using namespace cmvr::service;
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by xtkuang on 2025/6/10.
|
||||
//
|
||||
|
||||
#include "service/grpc_speaker_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_speaker_service.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace cmvr::device;
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by xtkuang on 2025/6/6.
|
||||
//
|
||||
|
||||
#include "service/grpc_system_service.h"
|
||||
#include "../../../include/service/grpc_service/grpc_system_service.h"
|
||||
|
||||
using namespace cmvr::device;
|
||||
using namespace cmvr::device;
|
||||
@ -2,7 +2,7 @@
|
||||
// Created by linbo on 2025/6/24.
|
||||
//
|
||||
|
||||
#include "../../include/http/httpclient.h"
|
||||
#include "../../../include/service/http_service/httpclient.h"
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
@ -19,7 +19,7 @@ add_library(utils STATIC
|
||||
math/se2.cpp
|
||||
math/se3.cpp
|
||||
math/so3.cpp
|
||||
controller/cartesian_controller.cpp
|
||||
solver/qp_solver.cpp
|
||||
)
|
||||
|
||||
target_include_directories(utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "utils/controller/cartesian_controller.h"
|
||||
#include "utils/solver/qp_solver.h"
|
||||
|
||||
using namespace cmvr::ctrl;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user