Compare commits
1 Commits
main
...
backup/loc
| Author | SHA1 | Date | |
|---|---|---|---|
| 19264915b4 |
275
CMakeLists.txt
275
CMakeLists.txt
@ -3,155 +3,38 @@ project(CmvrControlStation VERSION 1.0.0 LANGUAGES CXX)
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui")
|
set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui")
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
set(CMVR_MSQUIC_DEFAULT ON)
|
|
||||||
else()
|
|
||||||
set(CMVR_MSQUIC_DEFAULT OFF)
|
|
||||||
endif()
|
|
||||||
option(CMVR_WITH_MSQUIC "Build the embedded MsQuic test server" ${CMVR_MSQUIC_DEFAULT})
|
|
||||||
set(CMVR_MSQUIC_ROOT "" CACHE PATH "Optional MsQuic installation prefix on Linux")
|
|
||||||
set(CMVR_CXX_RUNTIME "" CACHE FILEPATH
|
|
||||||
"Optional libstdc++.so.6 matching a non-system Linux dependency prefix")
|
|
||||||
set(CMVR_ASSIMP_SCENE_PARSER "" CACHE FILEPATH
|
|
||||||
"Qt3D Assimp scene parser plugin used for URDF mesh files")
|
|
||||||
|
|
||||||
set(CMVR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
set(CMVR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||||
set(CMVR_LIB_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
set(CMVR_LIB_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
||||||
set(CMVR_TOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tools")
|
set(CMVR_TOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tools")
|
||||||
set(CMVR_CERT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/certs")
|
set(CMVR_CERT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/certs")
|
||||||
set(PROTO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/protos")
|
set(PROTO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/protos")
|
||||||
set(GENERATED_ROOT "${CMAKE_CURRENT_BINARY_DIR}/generated_cpp")
|
set(GENERATED_ROOT "${CMAKE_CURRENT_BINARY_DIR}/generated_cpp")
|
||||||
|
set(PROTOC "${CMVR_TOOLS_DIR}/run_protoc.cmd")
|
||||||
|
set(GRPC_CPP_PLUGIN "${CMVR_TOOLS_DIR}/grpc_cpp_plugin.exe")
|
||||||
|
|
||||||
find_package(Qt5 5.12 REQUIRED COMPONENTS
|
foreach(REQUIRED_FILE IN ITEMS
|
||||||
Core Gui Widgets Multimedia 3DCore 3DRender 3DExtras 3DInput 3DAnimation)
|
|
||||||
|
|
||||||
get_target_property(CMVR_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
|
||||||
if(CMVR_QMAKE_EXECUTABLE)
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${CMVR_QMAKE_EXECUTABLE}" -query QT_INSTALL_PLUGINS
|
|
||||||
OUTPUT_VARIABLE CMVR_QT_PLUGIN_ROOT
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
endif()
|
|
||||||
if(NOT CMVR_ASSIMP_SCENE_PARSER)
|
|
||||||
find_file(CMVR_ASSIMP_SCENE_PARSER
|
|
||||||
NAMES assimpsceneimport.dll assimpsceneimportd.dll libassimpsceneimport.so
|
|
||||||
HINTS
|
|
||||||
"${CMVR_QT_PLUGIN_ROOT}/sceneparsers"
|
|
||||||
"/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/plugins/sceneparsers")
|
|
||||||
endif()
|
|
||||||
if(NOT CMVR_ASSIMP_SCENE_PARSER OR NOT EXISTS "${CMVR_ASSIMP_SCENE_PARSER}")
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"Qt3D's Assimp scene parser was not found. It is required to display "
|
|
||||||
"STL, DAE, and 3DS meshes from bundled URDF models. On Ubuntu install "
|
|
||||||
"qt3d-assimpsceneimport-plugin, or set CMVR_ASSIMP_SCENE_PARSER to the "
|
|
||||||
"plugin file supplied by the selected Qt installation.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
# The checked-in native libraries use the Qt 5.12.4 MinGW 7.3 64-bit ABI.
|
|
||||||
set(PROTOC "${CMVR_TOOLS_DIR}/run_protoc.cmd")
|
|
||||||
set(GRPC_CPP_PLUGIN "${CMVR_TOOLS_DIR}/grpc_cpp_plugin.exe")
|
|
||||||
foreach(REQUIRED_FILE IN ITEMS
|
|
||||||
"${PROTOC}"
|
"${PROTOC}"
|
||||||
"${GRPC_CPP_PLUGIN}"
|
"${GRPC_CPP_PLUGIN}"
|
||||||
"${CMVR_LIB_DIR}/libgrpc++.a"
|
"${CMVR_LIB_DIR}/libgrpc++.a"
|
||||||
"${CMVR_LIB_DIR}/libprotobuf.a"
|
"${CMVR_LIB_DIR}/libprotobuf.a"
|
||||||
"${CMVR_LIB_DIR}/libavcodec.dll.a"
|
"${CMVR_LIB_DIR}/libavcodec.dll.a"
|
||||||
"${CMVR_LIB_DIR}/liburdfdom_model.dll.a")
|
"${CMVR_LIB_DIR}/liburdfdom_model.dll.a"
|
||||||
|
"${CMVR_LIB_DIR}/msquic.dll")
|
||||||
if(NOT EXISTS "${REQUIRED_FILE}")
|
if(NOT EXISTS "${REQUIRED_FILE}")
|
||||||
message(FATAL_ERROR "Required Windows dependency not found: ${REQUIRED_FILE}")
|
message(FATAL_ERROR "Required local dependency not found: ${REQUIRED_FILE}")
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
else()
|
|
||||||
find_package(Protobuf CONFIG QUIET)
|
|
||||||
if(NOT Protobuf_FOUND)
|
|
||||||
find_package(Protobuf REQUIRED)
|
|
||||||
endif()
|
|
||||||
find_package(gRPC CONFIG REQUIRED)
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
pkg_check_modules(FFMPEG REQUIRED IMPORTED_TARGET
|
|
||||||
libavcodec libavutil libswscale)
|
|
||||||
find_path(CMVR_URDFDOM_INCLUDE_DIR urdf_parser/urdf_parser.h
|
|
||||||
PATH_SUFFIXES include include/urdfdom)
|
|
||||||
find_path(CMVR_TINYXML_INCLUDE_DIR tinyxml.h PATH_SUFFIXES include)
|
|
||||||
find_library(CMVR_URDFDOM_MODEL_LIBRARY NAMES urdfdom_model)
|
|
||||||
if(NOT CMVR_URDFDOM_INCLUDE_DIR OR NOT CMVR_TINYXML_INCLUDE_DIR OR
|
|
||||||
NOT CMVR_URDFDOM_MODEL_LIBRARY)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"urdfdom/tinyxml was not found. Install liburdfdom-dev or add its prefix "
|
|
||||||
"to CMAKE_PREFIX_PATH.")
|
|
||||||
endif()
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
if(NOT TARGET protobuf::protoc)
|
find_package(Qt5 5.12 REQUIRED COMPONENTS
|
||||||
message(FATAL_ERROR "The Protobuf package does not provide protobuf::protoc")
|
Core Gui Widgets Multimedia 3DCore 3DRender 3DExtras 3DInput)
|
||||||
endif()
|
|
||||||
if(NOT TARGET gRPC::grpc_cpp_plugin)
|
|
||||||
message(FATAL_ERROR "The gRPC package does not provide gRPC::grpc_cpp_plugin")
|
|
||||||
endif()
|
|
||||||
set(PROTOC "$<TARGET_FILE:protobuf::protoc>")
|
|
||||||
set(GRPC_CPP_PLUGIN "$<TARGET_FILE:gRPC::grpc_cpp_plugin>")
|
|
||||||
|
|
||||||
# A Conda-provided Qt/gRPC stack may carry an older libstdc++ than the
|
add_executable(CmvrControlStation WIN32
|
||||||
# host compiler. Link against the runtime next to the imported dependency
|
|
||||||
# so symbol versions selected at link time match the library loaded from
|
|
||||||
# the generated RUNPATH. System packages resolve to the system runtime.
|
|
||||||
if(NOT CMVR_CXX_RUNTIME)
|
|
||||||
foreach(DEPENDENCY_TARGET IN ITEMS gRPC::grpc++ Qt5::Core)
|
|
||||||
get_target_property(DEPENDENCY_LOCATION
|
|
||||||
${DEPENDENCY_TARGET} IMPORTED_LOCATION_RELEASE)
|
|
||||||
if(NOT DEPENDENCY_LOCATION)
|
|
||||||
get_target_property(DEPENDENCY_LOCATION
|
|
||||||
${DEPENDENCY_TARGET} IMPORTED_LOCATION)
|
|
||||||
endif()
|
|
||||||
if(DEPENDENCY_LOCATION)
|
|
||||||
get_filename_component(DEPENDENCY_LIB_DIR
|
|
||||||
"${DEPENDENCY_LOCATION}" DIRECTORY)
|
|
||||||
if(EXISTS "${DEPENDENCY_LIB_DIR}/libstdc++.so.6")
|
|
||||||
set(CMVR_CXX_RUNTIME
|
|
||||||
"${DEPENDENCY_LIB_DIR}/libstdc++.so.6")
|
|
||||||
message(STATUS
|
|
||||||
"Using dependency-prefix C++ runtime: ${CMVR_CXX_RUNTIME}")
|
|
||||||
break()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMVR_WITH_MSQUIC)
|
|
||||||
if(WIN32)
|
|
||||||
if(NOT EXISTS "${CMVR_INCLUDE_DIR}/msquic.h" OR
|
|
||||||
NOT EXISTS "${CMVR_LIB_DIR}/msquic.dll")
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"CMVR_WITH_MSQUIC is enabled, but include/msquic.h or lib/msquic.dll is missing")
|
|
||||||
endif()
|
|
||||||
set(CMVR_MSQUIC_INCLUDE_DIR "${CMVR_INCLUDE_DIR}")
|
|
||||||
else()
|
|
||||||
find_path(CMVR_MSQUIC_INCLUDE_DIR msquic.h
|
|
||||||
HINTS "${CMVR_MSQUIC_ROOT}"
|
|
||||||
PATH_SUFFIXES include)
|
|
||||||
find_library(CMVR_MSQUIC_LIBRARY NAMES msquic
|
|
||||||
HINTS "${CMVR_MSQUIC_ROOT}"
|
|
||||||
PATH_SUFFIXES lib lib64)
|
|
||||||
if(NOT CMVR_MSQUIC_INCLUDE_DIR OR NOT CMVR_MSQUIC_LIBRARY)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"CMVR_WITH_MSQUIC=ON requires a Linux MsQuic installation. "
|
|
||||||
"Set CMVR_MSQUIC_ROOT or configure with -DCMVR_WITH_MSQUIC=OFF.")
|
|
||||||
endif()
|
|
||||||
get_filename_component(CMVR_MSQUIC_LIBRARY_DIR
|
|
||||||
"${CMVR_MSQUIC_LIBRARY}" DIRECTORY)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMVR_SOURCES
|
|
||||||
src/audiostreammanager.cpp
|
src/audiostreammanager.cpp
|
||||||
src/audiostreammanager.h
|
src/audiostreammanager.h
|
||||||
src/configeditorwidget.cpp
|
src/configeditorwidget.cpp
|
||||||
@ -168,77 +51,60 @@ set(CMVR_SOURCES
|
|||||||
src/robotclient.h
|
src/robotclient.h
|
||||||
src/trendwidget.cpp
|
src/trendwidget.cpp
|
||||||
src/trendwidget.h
|
src/trendwidget.h
|
||||||
src/uiicons.h
|
|
||||||
src/urdfviewerwidget.cpp
|
src/urdfviewerwidget.cpp
|
||||||
src/urdfviewerwidget.h
|
src/urdfviewerwidget.h
|
||||||
src/videodecoder.cpp
|
src/videodecoder.cpp
|
||||||
src/videodecoder.h
|
src/videodecoder.h
|
||||||
src/videoframe.h
|
|
||||||
src/videorenderwidget.cpp
|
|
||||||
src/videorenderwidget.h
|
|
||||||
ui/handeyecalibrationwidget.cpp
|
|
||||||
ui/handeyecalibrationwidget.h
|
|
||||||
ui/handeyecalibrationwidget.ui
|
|
||||||
ui/mainwindow.ui
|
ui/mainwindow.ui
|
||||||
ui/systemservicepage.ui
|
ui/systemservicepage.ui
|
||||||
ui/armservicepage.ui
|
ui/armservicepage.ui
|
||||||
ui/cameraservicepage.ui
|
ui/cameraservicepage.ui
|
||||||
ui/agvservicepage.ui
|
ui/agvservicepage.ui
|
||||||
ui/agvstatusdialog.ui
|
|
||||||
ui/audioservicepage.ui
|
ui/audioservicepage.ui
|
||||||
ui/quicserverpage.ui
|
ui/quicserverpage.ui
|
||||||
ui/diagnosticspage.ui
|
ui/diagnosticspage.ui
|
||||||
ui/rpcservicewidget.ui
|
ui/rpcservicewidget.ui
|
||||||
resources.qrc)
|
resources.qrc)
|
||||||
|
|
||||||
add_executable(CmvrControlStation ${CMVR_SOURCES})
|
|
||||||
if(WIN32)
|
|
||||||
set_target_properties(CmvrControlStation PROPERTIES WIN32_EXECUTABLE TRUE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(CmvrControlStation PROPERTIES
|
set_target_properties(CmvrControlStation PROPERTIES
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/$<LOWER_CASE:$<CONFIG>>")
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/$<LOWER_CASE:$<CONFIG>>")
|
||||||
|
|
||||||
target_compile_definitions(CmvrControlStation PRIVATE
|
target_compile_definitions(CmvrControlStation PRIVATE
|
||||||
CMVR_WITH_GRPC=1
|
_WIN32_WINNT=0x0600 CMVR_WITH_GRPC=1)
|
||||||
CMVR_WITH_MSQUIC=$<BOOL:${CMVR_WITH_MSQUIC}>)
|
target_include_directories(CmvrControlStation PRIVATE
|
||||||
if(WIN32)
|
|
||||||
target_compile_definitions(CmvrControlStation PRIVATE _WIN32_WINNT=0x0600)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(CmvrControlStation PRIVATE "${GENERATED_ROOT}")
|
|
||||||
if(WIN32)
|
|
||||||
target_include_directories(CmvrControlStation PRIVATE
|
|
||||||
"${CMVR_INCLUDE_DIR}"
|
"${CMVR_INCLUDE_DIR}"
|
||||||
"${CMVR_INCLUDE_DIR}/urdfdom_headers")
|
"${CMVR_INCLUDE_DIR}/urdfdom_headers"
|
||||||
else()
|
"${GENERATED_ROOT}")
|
||||||
target_include_directories(CmvrControlStation PRIVATE
|
|
||||||
"${CMVR_URDFDOM_INCLUDE_DIR}"
|
|
||||||
"${CMVR_TINYXML_INCLUDE_DIR}"
|
|
||||||
"${CMVR_INCLUDE_DIR}/urdfdom_headers")
|
|
||||||
endif()
|
|
||||||
if(CMVR_WITH_MSQUIC)
|
|
||||||
target_include_directories(CmvrControlStation PRIVATE "${CMVR_MSQUIC_INCLUDE_DIR}")
|
|
||||||
if(UNIX AND CMVR_MSQUIC_LIBRARY_DIR)
|
|
||||||
set_property(TARGET CmvrControlStation APPEND PROPERTY
|
|
||||||
BUILD_RPATH "${CMVR_MSQUIC_LIBRARY_DIR}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(CmvrControlStation PRIVATE
|
target_link_libraries(CmvrControlStation PRIVATE
|
||||||
Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Multimedia
|
Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Multimedia
|
||||||
Qt5::3DCore Qt5::3DRender Qt5::3DExtras Qt5::3DInput Qt5::3DAnimation)
|
Qt5::3DCore Qt5::3DRender Qt5::3DExtras Qt5::3DInput)
|
||||||
|
|
||||||
# Generate every project-local CMVR message. This avoids source-tree generated
|
|
||||||
# files and automatically picks up newly added configuration messages.
|
|
||||||
file(GLOB_RECURSE PROTO_FILES CONFIGURE_DEPENDS
|
|
||||||
"${PROTO_ROOT}/cmvr/api/*.proto"
|
|
||||||
"${PROTO_ROOT}/cmvr/common/*.proto"
|
|
||||||
"${PROTO_ROOT}/cmvr/config/*.proto"
|
|
||||||
"${PROTO_ROOT}/cmvr/msgs/agv.proto"
|
|
||||||
"${PROTO_ROOT}/cmvr/quic_edge/v1/*.proto")
|
|
||||||
|
|
||||||
|
set(PROTO_NAMES
|
||||||
|
cmvr/api/common
|
||||||
|
cmvr/msgs/agv
|
||||||
|
cmvr/api/agv_command
|
||||||
|
cmvr/api/agv_service
|
||||||
|
cmvr/api/arm_command
|
||||||
|
cmvr/api/arm_service
|
||||||
|
cmvr/api/biohead_command
|
||||||
|
cmvr/api/biohead_service
|
||||||
|
cmvr/api/camera_command
|
||||||
|
cmvr/api/camera_service
|
||||||
|
cmvr/api/configuration_command
|
||||||
|
cmvr/api/configuration_service
|
||||||
|
cmvr/api/dexhand_command
|
||||||
|
cmvr/api/dexhand_service
|
||||||
|
cmvr/api/hlc_command
|
||||||
|
cmvr/api/hlc_service
|
||||||
|
cmvr/api/microphone_command
|
||||||
|
cmvr/api/microphone_service
|
||||||
|
cmvr/api/speaker_command
|
||||||
|
cmvr/api/speaker_service
|
||||||
|
cmvr/api/system_command
|
||||||
|
cmvr/api/system_service
|
||||||
|
cmvr/api/test_service
|
||||||
|
cmvr/quic_edge/v1/quic_edge)
|
||||||
set(SERVICE_NAMES
|
set(SERVICE_NAMES
|
||||||
cmvr/api/agv_service
|
cmvr/api/agv_service
|
||||||
cmvr/api/arm_service
|
cmvr/api/arm_service
|
||||||
@ -253,9 +119,8 @@ set(SERVICE_NAMES
|
|||||||
cmvr/api/test_service)
|
cmvr/api/test_service)
|
||||||
|
|
||||||
set(GENERATED_FILES)
|
set(GENERATED_FILES)
|
||||||
foreach(PROTO_FILE IN LISTS PROTO_FILES)
|
foreach(PROTO_NAME IN LISTS PROTO_NAMES)
|
||||||
file(RELATIVE_PATH PROTO_RELATIVE "${PROTO_ROOT}" "${PROTO_FILE}")
|
set(PROTO_FILE "${PROTO_ROOT}/${PROTO_NAME}.proto")
|
||||||
string(REGEX REPLACE "\\.proto$" "" PROTO_NAME "${PROTO_RELATIVE}")
|
|
||||||
set(PB_CC "${GENERATED_ROOT}/${PROTO_NAME}.pb.cc")
|
set(PB_CC "${GENERATED_ROOT}/${PROTO_NAME}.pb.cc")
|
||||||
set(PB_H "${GENERATED_ROOT}/${PROTO_NAME}.pb.h")
|
set(PB_H "${GENERATED_ROOT}/${PROTO_NAME}.pb.h")
|
||||||
get_filename_component(PROTO_OUTPUT_DIR "${PB_CC}" DIRECTORY)
|
get_filename_component(PROTO_OUTPUT_DIR "${PB_CC}" DIRECTORY)
|
||||||
@ -263,10 +128,10 @@ foreach(PROTO_FILE IN LISTS PROTO_FILES)
|
|||||||
OUTPUT "${PB_CC}" "${PB_H}"
|
OUTPUT "${PB_CC}" "${PB_H}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROTO_OUTPUT_DIR}"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROTO_OUTPUT_DIR}"
|
||||||
COMMAND "${PROTOC}"
|
COMMAND "${PROTOC}"
|
||||||
"--proto_path=${PROTO_ROOT}"
|
--proto_path="${PROTO_ROOT}"
|
||||||
"--cpp_out=${GENERATED_ROOT}"
|
--cpp_out="${GENERATED_ROOT}"
|
||||||
"${PROTO_FILE}"
|
"${PROTO_FILE}"
|
||||||
DEPENDS "${PROTO_FILE}" ${PROTO_FILES}
|
DEPENDS "${PROTO_FILE}" "${PROTOC}"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
list(APPEND GENERATED_FILES "${PB_CC}" "${PB_H}")
|
list(APPEND GENERATED_FILES "${PB_CC}" "${PB_H}")
|
||||||
endforeach()
|
endforeach()
|
||||||
@ -280,19 +145,18 @@ foreach(SERVICE_NAME IN LISTS SERVICE_NAMES)
|
|||||||
OUTPUT "${GRPC_CC}" "${GRPC_H}"
|
OUTPUT "${GRPC_CC}" "${GRPC_H}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROTO_OUTPUT_DIR}"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROTO_OUTPUT_DIR}"
|
||||||
COMMAND "${PROTOC}"
|
COMMAND "${PROTOC}"
|
||||||
"--proto_path=${PROTO_ROOT}"
|
--proto_path="${PROTO_ROOT}"
|
||||||
"--grpc_out=${GENERATED_ROOT}"
|
--grpc_out="${GENERATED_ROOT}"
|
||||||
"--plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN}"
|
--plugin=protoc-gen-grpc="${GRPC_CPP_PLUGIN}"
|
||||||
"${PROTO_FILE}"
|
"${PROTO_FILE}"
|
||||||
DEPENDS "${PROTO_FILE}" ${PROTO_FILES}
|
DEPENDS "${PROTO_FILE}" "${PROTOC}" "${GRPC_CPP_PLUGIN}"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
list(APPEND GENERATED_FILES "${GRPC_CC}" "${GRPC_H}")
|
list(APPEND GENERATED_FILES "${GRPC_CC}" "${GRPC_H}")
|
||||||
endforeach()
|
endforeach()
|
||||||
target_sources(CmvrControlStation PRIVATE ${GENERATED_FILES})
|
target_sources(CmvrControlStation PRIVATE ${GENERATED_FILES})
|
||||||
|
|
||||||
if(WIN32)
|
file(GLOB ABSL_STATIC_LIBS "${CMVR_LIB_DIR}/libabsl_*.a")
|
||||||
file(GLOB ABSL_STATIC_LIBS "${CMVR_LIB_DIR}/libabsl_*.a")
|
target_link_libraries(CmvrControlStation PRIVATE
|
||||||
target_link_libraries(CmvrControlStation PRIVATE
|
|
||||||
"-Wl,--start-group"
|
"-Wl,--start-group"
|
||||||
"${CMVR_LIB_DIR}/libgrpc++.a"
|
"${CMVR_LIB_DIR}/libgrpc++.a"
|
||||||
"${CMVR_LIB_DIR}/libgrpc.a"
|
"${CMVR_LIB_DIR}/libgrpc.a"
|
||||||
@ -312,49 +176,24 @@ if(WIN32)
|
|||||||
"${CMVR_LIB_DIR}/libswscale.dll.a"
|
"${CMVR_LIB_DIR}/libswscale.dll.a"
|
||||||
"${CMVR_LIB_DIR}/liburdfdom_model.dll.a"
|
"${CMVR_LIB_DIR}/liburdfdom_model.dll.a"
|
||||||
ws2_32 crypt32 advapi32 bcrypt dbghelp iphlpapi secur32 ntdll)
|
ws2_32 crypt32 advapi32 bcrypt dbghelp iphlpapi secur32 ntdll)
|
||||||
else()
|
|
||||||
if(CMVR_CXX_RUNTIME)
|
|
||||||
target_link_libraries(CmvrControlStation PRIVATE "${CMVR_CXX_RUNTIME}")
|
|
||||||
endif()
|
|
||||||
target_link_libraries(CmvrControlStation PRIVATE
|
|
||||||
protobuf::libprotobuf
|
|
||||||
gRPC::grpc++
|
|
||||||
PkgConfig::FFMPEG
|
|
||||||
Threads::Threads
|
|
||||||
"${CMVR_URDFDOM_MODEL_LIBRARY}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32)
|
file(GLOB CMVR_RUNTIME_DLLS "${CMVR_LIB_DIR}/*.dll")
|
||||||
file(GLOB CMVR_RUNTIME_DLLS "${CMVR_LIB_DIR}/*.dll")
|
foreach(RUNTIME_DLL IN LISTS CMVR_RUNTIME_DLLS)
|
||||||
foreach(RUNTIME_DLL IN LISTS CMVR_RUNTIME_DLLS)
|
|
||||||
add_custom_command(TARGET CmvrControlStation POST_BUILD
|
add_custom_command(TARGET CmvrControlStation POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
"${RUNTIME_DLL}" "$<TARGET_FILE_DIR:CmvrControlStation>")
|
"${RUNTIME_DLL}" "$<TARGET_FILE_DIR:CmvrControlStation>")
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
|
||||||
|
|
||||||
foreach(CERTIFICATE IN ITEMS quic-test-server.pfx quic-test-ca.crt)
|
foreach(CERTIFICATE IN ITEMS quic-test-server.pfx quic-test-ca.crt)
|
||||||
if(EXISTS "${CMVR_CERT_DIR}/${CERTIFICATE}")
|
|
||||||
add_custom_command(TARGET CmvrControlStation POST_BUILD
|
add_custom_command(TARGET CmvrControlStation POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
"${CMVR_CERT_DIR}/${CERTIFICATE}"
|
"${CMVR_CERT_DIR}/${CERTIFICATE}"
|
||||||
"$<TARGET_FILE_DIR:CmvrControlStation>/${CERTIFICATE}")
|
"$<TARGET_FILE_DIR:CmvrControlStation>/${CERTIFICATE}")
|
||||||
install(FILES "${CMVR_CERT_DIR}/${CERTIFICATE}" DESTINATION bin)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_custom_command(TARGET CmvrControlStation POST_BUILD
|
add_custom_command(TARGET CmvrControlStation POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||||
"$<TARGET_FILE_DIR:CmvrControlStation>/sceneparsers"
|
"$<TARGET_FILE_DIR:CmvrControlStation>/models"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
"${CMVR_ASSIMP_SCENE_PARSER}"
|
"${CMAKE_CURRENT_SOURCE_DIR}/models/demo_arm.urdf"
|
||||||
"$<TARGET_FILE_DIR:CmvrControlStation>/sceneparsers/"
|
"$<TARGET_FILE_DIR:CmvrControlStation>/models/demo_arm.urdf")
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/models"
|
|
||||||
"$<TARGET_FILE_DIR:CmvrControlStation>/models")
|
|
||||||
|
|
||||||
install(TARGETS CmvrControlStation RUNTIME DESTINATION bin)
|
install(TARGETS CmvrControlStation RUNTIME DESTINATION bin)
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/models/"
|
|
||||||
DESTINATION bin/models)
|
|
||||||
install(PROGRAMS "${CMVR_ASSIMP_SCENE_PARSER}"
|
|
||||||
DESTINATION bin/sceneparsers)
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
QT += core gui widgets multimedia 3dcore 3drender 3dextras 3dinput 3danimation
|
QT += core gui widgets multimedia 3dcore 3drender 3dextras 3dinput
|
||||||
|
|
||||||
CONFIG += c++14 warn_on debug_and_release
|
CONFIG += c++14 warn_on debug_and_release
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
@ -17,7 +17,7 @@ MSQUIC_DLL = $$LIB_DIR/msquic.dll
|
|||||||
MSQUIC_TEST_CERT = $$CERT_DIR/quic-test-server.pfx
|
MSQUIC_TEST_CERT = $$CERT_DIR/quic-test-server.pfx
|
||||||
MSQUIC_TEST_CA = $$CERT_DIR/quic-test-ca.crt
|
MSQUIC_TEST_CA = $$CERT_DIR/quic-test-ca.crt
|
||||||
RUNTIME_DLLS = $$files($$LIB_DIR/*.dll)
|
RUNTIME_DLLS = $$files($$LIB_DIR/*.dll)
|
||||||
MODEL_DIR = $$clean_path($$PWD/models)
|
DEMO_URDF = $$clean_path($$PWD/models/demo_arm.urdf)
|
||||||
QT_SCENEPARSER_DIR = $$clean_path($$[QT_INSTALL_PLUGINS]/sceneparsers)
|
QT_SCENEPARSER_DIR = $$clean_path($$[QT_INSTALL_PLUGINS]/sceneparsers)
|
||||||
|
|
||||||
!exists($$PROTOC): error("protoc launcher not found. Run scripts/build_native_deps.ps1 first.")
|
!exists($$PROTOC): error("protoc launcher not found. Run scripts/build_native_deps.ps1 first.")
|
||||||
@ -110,7 +110,7 @@ QUIC_PROTO_FILES = \
|
|||||||
$$PROTO_ROOT/cmvr/quic_edge/v1/quic_edge.proto
|
$$PROTO_ROOT/cmvr/quic_edge/v1/quic_edge.proto
|
||||||
|
|
||||||
# Show the complete local proto tree in Qt Creator without compiling unused APIs.
|
# Show the complete local proto tree in Qt Creator without compiling unused APIs.
|
||||||
OTHER_FILES += $$files($$PROTO_ROOT/*.proto, true) $$files($$MODEL_DIR/*.urdf, true)
|
OTHER_FILES += $$files($$PROTO_ROOT/*.proto, true) $$DEMO_URDF
|
||||||
|
|
||||||
INCLUDEPATH += \
|
INCLUDEPATH += \
|
||||||
$$PROTO_GEN_DIR \
|
$$PROTO_GEN_DIR \
|
||||||
@ -212,7 +212,7 @@ LIBS += \
|
|||||||
-lsecur32 \
|
-lsecur32 \
|
||||||
-lntdll
|
-lntdll
|
||||||
|
|
||||||
DEFINES += CMVR_WITH_GRPC=1 CMVR_WITH_MSQUIC=1
|
DEFINES += CMVR_WITH_GRPC=1
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
TARGET = CmvrControlStation_d
|
TARGET = CmvrControlStation_d
|
||||||
@ -287,14 +287,14 @@ quic_certificate_deployment.files = $$MSQUIC_TEST_CERT
|
|||||||
quic_certificate_deployment.path = $$DESTDIR
|
quic_certificate_deployment.path = $$DESTDIR
|
||||||
quic_ca_deployment.files = $$MSQUIC_TEST_CA
|
quic_ca_deployment.files = $$MSQUIC_TEST_CA
|
||||||
quic_ca_deployment.path = $$DESTDIR
|
quic_ca_deployment.path = $$DESTDIR
|
||||||
|
demo_urdf_deployment.files = $$DEMO_URDF
|
||||||
|
demo_urdf_deployment.path = $$DESTDIR/models
|
||||||
assimp_scene_parser_deployment.files = $$ASSIMP_SCENE_PARSER
|
assimp_scene_parser_deployment.files = $$ASSIMP_SCENE_PARSER
|
||||||
assimp_scene_parser_deployment.path = $$DESTDIR/sceneparsers
|
assimp_scene_parser_deployment.path = $$DESTDIR/sceneparsers
|
||||||
COPIES += runtime_library_deployment quic_certificate_deployment quic_ca_deployment assimp_scene_parser_deployment
|
COPIES += runtime_library_deployment quic_certificate_deployment quic_ca_deployment demo_urdf_deployment assimp_scene_parser_deployment
|
||||||
|
|
||||||
QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$shell_quote($$shell_path($$MODEL_DIR)) $$shell_quote($$shell_path($$DESTDIR/models))
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
QMAKE_POST_LINK += $$escape_expand(\n\t) $$QMAKE_COPY_FILE $$shell_quote($$shell_path($$MSQUIC_TEST_CERT)) $$shell_quote($$shell_path($$DESTDIR/quic-test-server.pfx))
|
QMAKE_POST_LINK += $$QMAKE_COPY_FILE $$shell_quote($$shell_path($$MSQUIC_TEST_CERT)) $$shell_quote($$shell_path($$DESTDIR/quic-test-server.pfx))
|
||||||
QMAKE_POST_LINK += $$escape_expand(\n\t) $$QMAKE_COPY_FILE $$shell_quote($$shell_path($$MSQUIC_TEST_CA)) $$shell_quote($$shell_path($$DESTDIR/quic-test-ca.crt))
|
QMAKE_POST_LINK += $$escape_expand(\n\t) $$QMAKE_COPY_FILE $$shell_quote($$shell_path($$MSQUIC_TEST_CA)) $$shell_quote($$shell_path($$DESTDIR/quic-test-ca.crt))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
296
README.md
296
README.md
@ -1,296 +0,0 @@
|
|||||||
# CMVR Control Station
|
|
||||||
|
|
||||||
CMVR Control Station 是一个基于 Qt 5 的桌面控制站,用于连接 CMVR 机器人边缘服务。应用通过 gRPC 调用系统、机械臂、相机、AGV、音频、灵巧手和仿生头等服务,并提供视频预览、音频收发、URDF 模型查看、配置编辑和 QUIC 边缘节点测试服务。
|
|
||||||
|
|
||||||
## 主要功能
|
|
||||||
|
|
||||||
- 连接真实 gRPC 服务或使用内置 Demo 模式离线体验界面
|
|
||||||
- 系统状态、机械臂、AGV、相机及其他设备服务控制
|
|
||||||
- H.264/H.265 视频解码和 OpenGL 视频渲染
|
|
||||||
- 麦克风采集、扬声器播放和流式音频
|
|
||||||
- 内置 AUBO、Elfin、小研及自定义 URDF 模型选择与 Qt3D 显示
|
|
||||||
- Protobuf 配置查看、校验和编辑
|
|
||||||
- 可选的 MsQuic/TLS 测试服务器
|
|
||||||
|
|
||||||
## 设备管理
|
|
||||||
|
|
||||||
左侧进入 `gRPC > 设备管理` 后,默认打开“设备总览”:
|
|
||||||
|
|
||||||
- 主 gRPC 通道连接成功时自动调用 `GetSystemInfo` 和 `GetSystemStatus`。
|
|
||||||
- `GetSystemInfo` 用于显示边缘端系统名与版本;`GetSystemStatus.device_list`
|
|
||||||
用于展示在线设备 ID、设备大类、厂商和运行时驱动,并随系统状态轮询自动更新。
|
|
||||||
- 设备按 AGV、电池、相机、灵巧手、夹爪、麦克风、机械臂和扬声器分类,
|
|
||||||
支持按设备 ID 或类型搜索。
|
|
||||||
- 点击只读状态下的设备卡片会进入对应控制页面,并自动填写该设备的
|
|
||||||
`device_id`。
|
|
||||||
- 点击“修改”会从 ConfigurationService 加载 `manager/device_manager.pb.txt`
|
|
||||||
及 `devices/*/*.pb.txt`:可以修改设备 ID、类型和品牌/驱动,展开“配置参数”
|
|
||||||
后按 Protobuf 字段逐项编辑,也可以使用卡片右上角删除按钮或末尾的“+”卡片
|
|
||||||
增删设备。
|
|
||||||
- 点击“完成”会先写入各设备配置,再写入 DeviceManager 配置;保存使用远端
|
|
||||||
revision 做并发版本校验。当前只上传配置文件,不会自动重启或重载 cmvr-es。
|
|
||||||
- “配置管理”页签保留远端 Protobuf 配置的读取、字段编辑、校验和保存能力;
|
|
||||||
配置服务默认端口为 `50053`,与主控制 gRPC 通道独立连接。
|
|
||||||
|
|
||||||
`GetSystemStatus` 的设备条目包含 `device_type`、稳定的 `device_kind`、
|
|
||||||
`driver_type` 和 `vendor`。上位机优先使用 `device_kind` 判断设备大类,避免 AUBO、
|
|
||||||
华沿等具体机械臂驱动被错误归类为 AGV;设备卡片副标题会显示如
|
|
||||||
`AUBO · AuboARM` 的厂商与驱动信息。“在线”仍表示设备存在于边缘端
|
|
||||||
本次返回的 `device_list` 中。
|
|
||||||
|
|
||||||
## 机械臂自动识别与切换
|
|
||||||
|
|
||||||
机械臂页面的顶部选单来自 `GetSystemStatus` 返回的全部在线机械臂,不再使用
|
|
||||||
固定的“左臂/右臂”选项。选择设备管理中的机械臂卡片,或直接切换该选单后,
|
|
||||||
上位机会以相同的 `device_id` 调用 `ArmService.GetArmInfo` 和
|
|
||||||
`ArmService.getRobotState`:
|
|
||||||
|
|
||||||
- `GetArmInfo` 返回厂商、SDK 检测到的精确型号/子型号、自由度、关节名以及默认
|
|
||||||
Base/TCP 坐标系。AUBO 使用 `getRobotType/getRobotSubType`,华沿使用
|
|
||||||
`HRIF_ReadRobotModel`;SDK 查询失败时边缘端回退到配置文件中的型号。
|
|
||||||
- 关节点动区、零位标定关节列表和实时关节表按返回的自由度与关节名动态生成,
|
|
||||||
不再假定机械臂固定为 7 轴。
|
|
||||||
- 上位机按厂商、型号和子型号自动选择内置 URDF。驱动关节名与 URDF 关节名不一致
|
|
||||||
时,按 SDK/URDF 的关节顺序映射实时姿态和示教姿态。
|
|
||||||
- `getRobotState` 一次返回运行模式、安全状态、使能/故障状态、关节状态和 TCP
|
|
||||||
位姿,切换设备时响应会按 `device_id` 校验,避免旧设备的在途响应覆盖新设备。
|
|
||||||
|
|
||||||
上述功能需要 cmvr-es `061bfc50` 或更高版本。
|
|
||||||
|
|
||||||
### 机械臂点动与实时状态
|
|
||||||
|
|
||||||
“模型与控制”页将 URDF 模型、速度点动和只读遥测放在同一工作区:
|
|
||||||
|
|
||||||
- “关节速度”按实时自由度生成每个关节的当前位置与 `−/+` 按钮。每条位置条
|
|
||||||
使用当前精确 URDF 的关节上下限映射实时位置;按住按钮时调用 `speedJ`,速度
|
|
||||||
为左侧 SpeedJ 最大速度乘以速度倍率,松开按钮立即调用 `stopMotion`。
|
|
||||||
- “笛卡尔速度”显示当前 X/Y/Z、RX/RY/RZ,并使用相同的按住点动交互调用
|
|
||||||
`speedL`。SpeedL 使用独立的笛卡尔速度(m/s)和加速度(m/s²)限制,不再
|
|
||||||
复用 SpeedJ 的关节单位参数。基座坐标和工具坐标名称通过 `ListBaseFrame`、`ListTCPFrame` 自动
|
|
||||||
获取;选择变化后,遥测通过 `getPose(base_link, ee_link)` 显示对应坐标对的
|
|
||||||
末端位姿。
|
|
||||||
- 当前 cmvr-es 的 `speedL` 协议只接受 Base/Tool 类型,不接受命名坐标系。
|
|
||||||
因此点动命令按 Base 语义发送,坐标名称用于选定实时位姿的参考基座和 TCP;
|
|
||||||
后续若需要在任意命名坐标系轴向点动,需要扩展 `SpeedL.Request` 及边缘端驱动。
|
|
||||||
- 下方“实时状态”只读显示关节位置、速度、由连续速度采样计算的加速度,以及
|
|
||||||
当前坐标对下的末端位置姿态;关节与末端两个状态区域等宽显示,不再提供
|
|
||||||
MoveJ/MoveL 目标输入和示教按钮。
|
|
||||||
|
|
||||||
## 技术栈和目录
|
|
||||||
|
|
||||||
项目使用 C++14、Qt 5、gRPC/Protobuf、FFmpeg、urdfdom 和可选的 MsQuic。
|
|
||||||
|
|
||||||
```text
|
|
||||||
src/ 应用、服务客户端、音视频和三维显示源码
|
|
||||||
ui/ Qt Designer 界面文件和辅助控件
|
|
||||||
protos/ CMVR gRPC、配置和 QUIC 协议定义
|
|
||||||
models/ 内置机械臂 URDF、网格资源与来源说明
|
|
||||||
certs/ QUIC 测试 CA;本机 PFX 证书不提交到 Git
|
|
||||||
include/, lib/ Windows MinGW 预编译依赖
|
|
||||||
tools/ Windows protoc 和 grpc_cpp_plugin
|
|
||||||
scripts/ Windows 依赖、构建脚本和 Linux 构建入口
|
|
||||||
```
|
|
||||||
|
|
||||||
CMake 是 Windows 和 Linux 的统一构建入口。`CmvrControlStation.pro` 继续保留,用于现有 Windows Qt Creator/qmake 工作流。
|
|
||||||
|
|
||||||
## Linux 编译
|
|
||||||
|
|
||||||
### 1. 安装依赖
|
|
||||||
|
|
||||||
Debian/Ubuntu 示例:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install \
|
|
||||||
build-essential cmake ninja-build pkg-config \
|
|
||||||
qtbase5-dev qtmultimedia5-dev qt3d5-dev qt3d-assimpsceneimport-plugin \
|
|
||||||
libprotobuf-dev protobuf-compiler protobuf-compiler-grpc \
|
|
||||||
libgrpc++-dev \
|
|
||||||
libavcodec-dev libavutil-dev libswscale-dev \
|
|
||||||
liburdfdom-dev libtinyxml-dev libassimp-dev libgl1-mesa-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
不同发行版的包名可能不同,但需要提供以下 CMake/pkg-config 组件:
|
|
||||||
|
|
||||||
- Qt 5.12 或更高版本:Core、Gui、Widgets、Multimedia、3DCore、3DRender、3DExtras、3DInput
|
|
||||||
- Protobuf 和 `protoc`
|
|
||||||
- gRPC C++ 和 `grpc_cpp_plugin`
|
|
||||||
- FFmpeg:libavcodec、libavutil、libswscale
|
|
||||||
- urdfdom、Assimp 和 OpenGL
|
|
||||||
|
|
||||||
### 2. 编译默认版本
|
|
||||||
|
|
||||||
Linux 默认关闭内置 MsQuic 服务,其余功能可正常编译:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bash scripts/build_demo.sh Release
|
|
||||||
```
|
|
||||||
|
|
||||||
等价的手动命令:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cmake -S . -B build/linux-release -G Ninja \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMVR_WITH_MSQUIC=OFF
|
|
||||||
cmake --build build/linux-release --parallel
|
|
||||||
```
|
|
||||||
|
|
||||||
输出程序:
|
|
||||||
|
|
||||||
```text
|
|
||||||
bin/release/CmvrControlStation
|
|
||||||
```
|
|
||||||
|
|
||||||
Debug 构建:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bash scripts/build_demo.sh Debug
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 启用 Linux MsQuic
|
|
||||||
|
|
||||||
安装包含 `msquic.h`、`msquic_posix.h` 和 `libmsquic.so` 的 Linux MsQuic 开发包,然后配置:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cmake -S . -B build/linux-release -G Ninja \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMVR_WITH_MSQUIC=ON \
|
|
||||||
-DCMVR_MSQUIC_ROOT=/opt/msquic
|
|
||||||
cmake --build build/linux-release --parallel
|
|
||||||
```
|
|
||||||
|
|
||||||
如果 MsQuic 安装在系统标准目录,可以省略 `CMVR_MSQUIC_ROOT`。运行时动态链接器必须能够找到 `libmsquic.so`。
|
|
||||||
|
|
||||||
QUIC 服务使用 PKCS#12 证书。将 `quic-test-server.pfx` 放入 `certs/` 后重新构建,CMake 会把它复制到程序目录。默认测试密码为 `cmvr-test`。
|
|
||||||
|
|
||||||
### 4. 运行
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./bin/release/CmvrControlStation
|
|
||||||
```
|
|
||||||
|
|
||||||
如果使用非系统 Qt 或其他自定义依赖前缀,通过 `CMAKE_PREFIX_PATH` 指定:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cmake -S . -B build/linux-release -G Ninja \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_PREFIX_PATH="/opt/qt5;/opt/grpc;/opt/urdfdom"
|
|
||||||
```
|
|
||||||
|
|
||||||
Qt Multimedia 在 Linux 上依赖系统音频/媒体后端;如果音频文件不能解码,请安装发行版提供的 GStreamer 插件。URDF 中的外部网格由 Qt3D Assimp scene parser 加载。
|
|
||||||
|
|
||||||
## Windows 编译
|
|
||||||
|
|
||||||
Windows 仓库内的静态库使用固定 ABI:
|
|
||||||
|
|
||||||
- Qt 5.12.4 MinGW 64-bit
|
|
||||||
- MinGW 7.3 64-bit
|
|
||||||
- gRPC 1.48.4 / Protobuf 3.19.5
|
|
||||||
- FFmpeg 4.4.5
|
|
||||||
- MsQuic 2.5.9 OpenSSL x64
|
|
||||||
- urdfdom 4.0.3
|
|
||||||
|
|
||||||
不要混用 MSVC、32 位 Qt 或其他 MinGW ABI。详细依赖说明见 [NATIVE_DEPS.md](NATIVE_DEPS.md)。
|
|
||||||
|
|
||||||
### 1. 准备 Qt 和证书
|
|
||||||
|
|
||||||
默认目录:
|
|
||||||
|
|
||||||
```text
|
|
||||||
C:\Qt\Qt5.12.4\5.12.4\mingw73_64
|
|
||||||
C:\Qt\Qt5.12.4\Tools\mingw730_64
|
|
||||||
```
|
|
||||||
|
|
||||||
`certs/quic-test-server.pfx` 含有私钥,因此被 Git 忽略。可以从开发环境安全复制,或生成新的测试证书:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
powershell -ExecutionPolicy Bypass `
|
|
||||||
-File .\scripts\install_msquic.ps1 `
|
|
||||||
-ServerIp 192.168.0.118
|
|
||||||
|
|
||||||
Copy-Item `
|
|
||||||
.\third_party\install\msquic\certs\quic-test-server.pfx `
|
|
||||||
.\certs\
|
|
||||||
Copy-Item `
|
|
||||||
.\third_party\install\msquic\certs\quic-test-ca.crt `
|
|
||||||
.\certs\ `
|
|
||||||
-Force
|
|
||||||
```
|
|
||||||
|
|
||||||
将示例 IP 替换为运行控制站电脑的地址。
|
|
||||||
|
|
||||||
### 2. 使用 CMake 编译
|
|
||||||
|
|
||||||
在 PowerShell 中:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$QtRoot = "C:\Qt\Qt5.12.4"
|
|
||||||
$env:Path = "$QtRoot\5.12.4\mingw73_64\bin;$QtRoot\Tools\mingw730_64\bin;$env:Path"
|
|
||||||
|
|
||||||
cmake -S . -B build\windows-release -G "MinGW Makefiles" `
|
|
||||||
-DCMAKE_BUILD_TYPE=Release `
|
|
||||||
-DCMAKE_PREFIX_PATH="$QtRoot\5.12.4\mingw73_64" `
|
|
||||||
-DCMVR_WITH_MSQUIC=ON
|
|
||||||
|
|
||||||
cmake --build build\windows-release --parallel 4
|
|
||||||
```
|
|
||||||
|
|
||||||
输出程序:
|
|
||||||
|
|
||||||
```text
|
|
||||||
bin\release\CmvrControlStation.exe
|
|
||||||
```
|
|
||||||
|
|
||||||
CMake 会复制仓库 `lib/` 中的运行时 DLL、现有证书和完整 `models/` 模型目录。制作独立安装包时,仍需执行 Qt 的 `windeployqt` 复制 Qt DLL 和插件。
|
|
||||||
|
|
||||||
### 3. 使用现有 qmake 脚本
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
powershell -ExecutionPolicy Bypass `
|
|
||||||
-File .\scripts\build_demo.ps1 `
|
|
||||||
-Configuration release
|
|
||||||
```
|
|
||||||
|
|
||||||
Debug:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
powershell -ExecutionPolicy Bypass `
|
|
||||||
-File .\scripts\build_demo.ps1 `
|
|
||||||
-Configuration debug
|
|
||||||
```
|
|
||||||
|
|
||||||
也可以在 Qt Creator 中打开 `CmvrControlStation.pro`,选择 `Desktop Qt 5.12.4 MinGW 64-bit` Kit,运行 qmake 后构建。
|
|
||||||
|
|
||||||
## CMake 选项
|
|
||||||
|
|
||||||
| 选项 | Windows 默认值 | Linux 默认值 | 说明 |
|
|
||||||
| --- | --- | --- | --- |
|
|
||||||
| `CMVR_WITH_MSQUIC` | `ON` | `OFF` | 编译内置 QUIC 测试服务器 |
|
|
||||||
| `CMVR_MSQUIC_ROOT` | 空 | 空 | Linux MsQuic 的安装前缀 |
|
|
||||||
| `CMVR_CXX_RUNTIME` | 空 | 自动探测 | 非系统依赖前缀配套的 `libstdc++.so.6` |
|
|
||||||
| `CMVR_ASSIMP_SCENE_PARSER` | 自动探测 | 自动探测 | Qt3D Assimp 场景解析插件文件;用于加载 STL、DAE 和 3DS 网格 |
|
|
||||||
| `CMAKE_BUILD_TYPE` | `Release`(教程) | `Release`(教程) | `Debug` 或 `Release` |
|
|
||||||
|
|
||||||
未启用 MsQuic 时,QUIC 页面仍会显示,但启动服务会给出明确提示,不影响 gRPC、Demo、音视频和 URDF 功能。
|
|
||||||
|
|
||||||
## 开发与排错
|
|
||||||
|
|
||||||
- CMake 配置找不到 Qt:设置 `CMAKE_PREFIX_PATH` 指向 Qt 安装前缀。
|
|
||||||
- 找不到 gRPC 插件:确认安装了 `grpc_cpp_plugin`,并且 gRPC CMake 包与运行库来自同一前缀。
|
|
||||||
- Proto 编译或链接版本错误:`protoc`、Protobuf 头文件和 Protobuf 库必须来自同一套安装。
|
|
||||||
- 出现 `GLIBCXX_* not found`:不要混用不兼容的编译器和 C++ 运行库。CMake 会优先链接 gRPC/Qt 前缀内配套的 `libstdc++.so.6`;特殊环境可通过 `-DCMVR_CXX_RUNTIME=/path/to/libstdc++.so.6` 显式指定。
|
|
||||||
- 只有 `演示 · demo_arm` 能显示,AUBO、Elfin、小研模型为空:`demo_arm`
|
|
||||||
仅使用 Qt3D 内置几何体,其他模型需要 Assimp 场景解析插件加载 STL、DAE
|
|
||||||
和 3DS 网格。在 Debian/Ubuntu 上执行
|
|
||||||
`sudo apt install qt3d-assimpsceneimport-plugin`,然后重新运行 CMake 和构建。
|
|
||||||
CMake 会检测插件并将其复制到程序目录的 `sceneparsers/`;如果使用自定义
|
|
||||||
Qt,可通过
|
|
||||||
`-DCMVR_ASSIMP_SCENE_PARSER=/path/to/libassimpsceneimport.so` 指定插件。
|
|
||||||
构建后应存在
|
|
||||||
`bin/release/sceneparsers/libassimpsceneimport.so`(Windows 对应
|
|
||||||
`assimpsceneimport.dll`)。如果插件存在但仍加载失败,查看应用日志中的
|
|
||||||
`Qt3D 无法加载网格` 信息,并确认插件与所用 Qt 版本及架构一致。
|
|
||||||
- Linux 没有声音:检查 Qt Multimedia 后端、系统音频服务和 GStreamer 插件。
|
|
||||||
- QUIC 无法启动:检查 MsQuic 动态库搜索路径、PFX 文件、密码、监听地址和防火墙。
|
|
||||||
|
|
||||||
Proto 约定和目录说明见 [protos/README.md](protos/README.md)。
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 264 B |
@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14"/><path d="M5 12h14"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 228 B |
@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M19 6l-1 14H6L5 6"/><path d="M10 11v5"/><path d="M14 11v5"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 298 B |
@ -1,33 +0,0 @@
|
|||||||
# Bundled robot models
|
|
||||||
|
|
||||||
The control station discovers `*.urdf` files below this directory recursively
|
|
||||||
and lists them in the arm page's model selector. Keep a model's mesh directory
|
|
||||||
beside its URDF package so `package://` and relative mesh references continue to
|
|
||||||
resolve after deployment.
|
|
||||||
|
|
||||||
## Sources
|
|
||||||
|
|
||||||
- `aubo_description`: <https://github.com/AuboRobot/aubo_description>, commit
|
|
||||||
`47fa5e02fa873f27f7e812d31f31e3f4cf5e56b1` (`main`). The upstream URDF,
|
|
||||||
README, package metadata, and all available visual meshes referenced by those
|
|
||||||
URDFs are preserved.
|
|
||||||
- `elfin_model`: <https://github.com/huayan-robotics/elfin_model>, commit
|
|
||||||
`84baf18d37eefa46b6f092c7fa1f105f81f70ecb` (`main`). The original ROS 1
|
|
||||||
Xacro files are preserved in `xacro_source`. Files in `urdf` are standalone
|
|
||||||
URDFs generated from them for this application's non-Xacro parser. Gazebo and
|
|
||||||
transmission includes are intentionally omitted because they are not part of
|
|
||||||
the source repository and are not needed by the 3D viewer.
|
|
||||||
- `xiaoyan_description`: `SmartBench/cmvr-es`, commit
|
|
||||||
`ed9df8fd31d8467a6119e2267edaefc43193b91e` (`dev`), directory
|
|
||||||
`model/xiaoyan_description`. The four URDFs and their STL meshes are bundled;
|
|
||||||
simulator-only XML and USD payloads are omitted.
|
|
||||||
|
|
||||||
Collision-only and otherwise unreferenced mesh files are omitted because the
|
|
||||||
control station renders each URDF's `visual` geometry only. A small number of
|
|
||||||
AUBO descriptions reference visual files that are already absent from the
|
|
||||||
upstream revision; those models still load their available geometry and report
|
|
||||||
the missing files in the application log.
|
|
||||||
|
|
||||||
Upstream projects did not include standalone license files at these revisions.
|
|
||||||
Consult each source repository before redistributing the model assets outside
|
|
||||||
this project.
|
|
||||||
@ -1,211 +0,0 @@
|
|||||||
<div align="center">
|
|
||||||
<h1 align="center">aubo_description</h1>
|
|
||||||
<h3 align="center">
|
|
||||||
机器人模型描述仓库
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
本仓库集中维护所有 `ARCS` 软件支持的所有机器人模型。
|
|
||||||
|
|
||||||
## 机器人型号完备描述
|
|
||||||
|
|
||||||
| 项目 | 类型 | 用途 | 存储路径 | 必要性 | 示例 |
|
|
||||||
| ---------- | --------- | ------------------------------------------------------------ | ------------------------------------- | ------ | ------------------------------------------------------------ |
|
|
||||||
| 机器人型号 | 字符串 | 机器人型号统一定义 | | 必须 | `aubo_i5` |
|
|
||||||
| `urdf`文件 | 文本文件 | 算法加载机器人模型 | `urdf/<robot_type>.urdf` | 必须 | [`urdf/aubo_i5.urdf`](urdf/aubo_i5.urdf) |
|
|
||||||
| `srdf`文件 | 文本文件 | | `urdf/<robot_type>.srdf` | | [`urdf/aubo_i5.srdf`](urdf/aubo_i5.srdf) |
|
|
||||||
| 碰撞模型 | `STL`文件 | 碰撞检测算法 | `meshes/<robot_type>/collision/*.STL` | 必须 | [`meshes/aubo_i5/collision/base_link.STL`](meshes/aubo_i5/collision/base_link.STL) |
|
|
||||||
| 显示模型 | `3ds`文件 | 示教器显示 | `meshes/<robot_type>/visual/*.3ds` | 必须 | [`meshes/aubo_i5/visual/base.3ds`](meshes/aubo_i5/visual/base.3ds) |
|
|
||||||
| 配置文件 | 文本文件 | 机器人型号扩展描述,对`urdf`的补充,如机器人初始位姿、打包位姿、默认速度加速度 | `config/<robot_type>.conf` | 必须 | [`config/aubo_i5.conf`](config/aubo_i5.conf) |
|
|
||||||
|
|
||||||
## 机器人型号规范
|
|
||||||
|
|
||||||
```shell
|
|
||||||
<机器人系列代码><机器人负载><机器人系列扩展代码>-<机器人版本升级或定制代码>
|
|
||||||
|
|
||||||
# i5
|
|
||||||
# i5L
|
|
||||||
# i5RS
|
|
||||||
# i20-1650
|
|
||||||
```
|
|
||||||
|
|
||||||
### 1. 机器人系列代码
|
|
||||||
|
|
||||||
一般为**单个小写字母**,指代机器人的应用行业,必须
|
|
||||||
|
|
||||||
i - industry: 工业
|
|
||||||
g - gaoxingneng? 未知
|
|
||||||
f - <> 未知
|
|
||||||
c - consume: 消费
|
|
||||||
e - education: 教育
|
|
||||||
s - service: 服务
|
|
||||||
|
|
||||||
### 2. 机器人负载
|
|
||||||
|
|
||||||
机器人的标称负载,单位为`Kg`,必须
|
|
||||||
|
|
||||||
5/7/10/16/20
|
|
||||||
|
|
||||||
### 3. 机器人系列扩展代码
|
|
||||||
|
|
||||||
一般为**单个大写字母**,为标准系列的改性(一般加长或者减短连杆,升级关节电机减速器等),可选
|
|
||||||
|
|
||||||
L: 连杆加长版本
|
|
||||||
B: 负载增加(缩短连杆?)
|
|
||||||
S: 高速(电机或减速器升级)
|
|
||||||
RS:
|
|
||||||
RX: 柔性?
|
|
||||||
TD: 特高压带电?
|
|
||||||
|
|
||||||
### 4. 机器人版本升级或定制代码
|
|
||||||
|
|
||||||
一般出现在主型号(<机器人系列代码><机器人负载><机器人系列扩展代码>)之后,通过减号连接,字符和数字的组合,可选
|
|
||||||
|
|
||||||
i20-1650: 1650指代臂展(非常不建议)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 内部用模型文件及.conf文件命名规范
|
|
||||||
|
|
||||||
```
|
|
||||||
<品牌简称小写>_<机器人系列代码><机器人负载>_<机器人SN码中对应的版本>
|
|
||||||
|
|
||||||
aubo_i5_10 # i5标准版
|
|
||||||
aubo_i5_11 # i5标准版末端360
|
|
||||||
aubo_i5_12 # i5标准版加长版
|
|
||||||
aubo_i5_13 # i5标准版加长版末端360
|
|
||||||
```
|
|
||||||
|
|
||||||
### 1. 现行SN码简介
|
|
||||||
|
|
||||||
| 型号 | 型号说明 | 版本 | 版本说明 | 改动号 | 改动说明 |
|
|
||||||
| :--: | :------: | :--: | :----------------------------------------------------: | :----: | :----------------------: |
|
|
||||||
| 03 | i3 | 10 | 标准版:ID1-6 ±175° | A | 标准版 |
|
|
||||||
| 05 | i5 | 11 | 标准版末端360:ID1-5 ±175° ID6 ±360° | B | 标准版末端360 |
|
|
||||||
| 07 | i7 | 12 | 标准版加长版:ID1-6 ±175° | C | 标准版加长版 |
|
|
||||||
| 10 | i10 | 13 | 标准版加长版末端360:ID1-5 ±175° ID6 ±360° | D | 标准版加长版末端360 |
|
|
||||||
| 11 | i12(i10B) | 14 | 普通高速版本:ID1-6 ±175° | E | 高速瑞声版 |
|
|
||||||
| 16 | i16 | 15 | 高速瑞声版:ID1-6 ±175° | F | 高速标准版 |
|
|
||||||
| 20 | i20 | 16 | 普通高速末端360版本:ID1-5 ±175° ID6 ±360° | G | 高速标准版末端360 |
|
|
||||||
| 13 | C3 | 17 | 高速标准版:ID1-6 ±175° | H | 高速小减速比版 |
|
|
||||||
| 15 | C5 | 18 | 高速标准版末端360:ID1-5 ±175° ID6 ±360° | I | 高速小减速比版末端360 |
|
|
||||||
| 17 | C10 | 19 | 高速小减速比版:ID1-6 ±175° | J | 标准版配六维力传感器 |
|
|
||||||
| 18 | C16 | 20 | 高速小减速比版末端360:ID1-5 ±175° ID6 ±360° | K | 标准版配视觉 |
|
|
||||||
| 19 | C20 | 21 | 标准版配六维力传感器:ID1-6 ±175° | L | 高速标准版配六维力传感器 |
|
|
||||||
| 23 | E3 | 22 | 标准版配视觉:ID1-6 ±175° | M | 高速标准版配视觉 |
|
|
||||||
| 24 | i30 | 23 | 高速标准版配六维力传感器:ID1-6 ±175° | N | 高速标准版加长版 |
|
|
||||||
| 25 | E5 | 24 | 高速标准版配视觉:ID1-6 ±175° | O | 高速标准版加长版末端360 |
|
|
||||||
| 21 | E10 | 25 | 高速标准版加长版:ID1-6 ±175° | P | 高速末端360/ID1 360 |
|
|
||||||
| 26 | E16 | 26 | 高速标准版加长版末端360:ID1-5 ±175° ID6 ±360° | Q | 特殊定制版 |
|
|
||||||
| 22 | E20 | 27 | 高速末端360/ID1 360:ID1 ±360° ID2-5 ±175° ID6 ±360° | R | 标准版(标配360) |
|
|
||||||
| 33 | G3 | 28 | 标准版ID1 360:ID1 ±360° ID2-6±175° | S | 高速标准版(标配360) |
|
|
||||||
| 34 | G6 | 29 | 特殊定制版:ID1-6 ±175° | T | 标准加长版(标配360) |
|
|
||||||
| 35 | i3H | 30 | 标准版(标配360):ID1-6 ±360° | U | 配一维力控传感器 |
|
|
||||||
| 36 | i5H | 31 | 高速标准版(标配360):ID1-6 ±360° | V | 关节限位 |
|
|
||||||
| 37 | i7H | 32 | 标准加长版(标配360):ID1-6 ±360° | W | i5改i7 |
|
|
||||||
| 38 | i10H | 33 | 高速标准加长版(标配360):ID1-6 ±360° | | |
|
|
||||||
| 39 | i12H | 34 | 标准版配六维力传感器(标配360):ID1-6 ±360° | | |
|
|
||||||
| 40 | i16H | 35 | 高速瑞声版(标配360):ID1-6 ±360° | | |
|
|
||||||
| 41 | T12 | 36 | 柏惠维康版(标配360):ID1-6 ±360° | | |
|
|
||||||
| 42 | T6 | 37 | 标准版配一维力传感器(外走线标配360):ID1-6 ±360° | | |
|
|
||||||
| | | 38 | 标准版配一维力传感器(内走线标配360):ID1-6 ±360° | | |
|
|
||||||
| | | 39 | 标准版(CANLite协议):ID1-6 ±360° | | |
|
|
||||||
|
|
||||||
|
|
||||||
### 2. 已支持的机器人型号
|
|
||||||
|
|
||||||
| 机器人型号 | 是否量产 | 备注 |
|
|
||||||
| :---------: | :------: | :--------------------------------------------: |
|
|
||||||
| aubo_i3 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i3_10 | × | 量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i3_30 | √ | 实际量产版本 |
|
|
||||||
| aubo_i3_31 | √ | 如影定制 |
|
|
||||||
| aubo_i3_37 | √ | 力控一维外走线 |
|
|
||||||
| aubo_i3_38 | √ | 力控一维内走线 |
|
|
||||||
| aubo_S3 | × | 低成本机械臂 |
|
|
||||||
| aubo_i5 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i5_10 | × | 量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i5_11 | × | 末端360。量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i5_30 | √ | 标准版本,目前发往海外主要量产版本。近期会变更 |
|
|
||||||
| aubo_i5_31 | √ | 实际量产出货版本 |
|
|
||||||
| aubo_i5_36 | √ | 柏惠维康版 |
|
|
||||||
| aubo_i5_37 | √ | 力控一维外走线 |
|
|
||||||
| aubo_i5_38 | √ | 力控一维内走线 |
|
|
||||||
| aubo_i5L | | 留型号,兼容之前版本 |
|
|
||||||
| aubo_i5_12 | × | 量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i5_13 | × | 末端360。量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i5_32 | √ | 实际量产版本 |
|
|
||||||
| aubo_i5_33 | × | 高速标准加长版 |
|
|
||||||
| aubo_i5F_34 | √ | 力控定制版 |
|
|
||||||
| aubo_iS5 | x | 高性能机械臂 |
|
|
||||||
| aubo_i7 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i7_10 | × | 量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i7_11 | × | 末端360。量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i7_30 | √ | 实际量产版本 |
|
|
||||||
| aubo_iS7 | x | 高性能机械臂 |
|
|
||||||
| aubo_i10 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i10_10 | × | 量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i10_11 | × | 末端360。量产版本已变更,现为老版本 |
|
|
||||||
| aubo_i10_30 | √ | 实际量产版本 |
|
|
||||||
| aubo_i12 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i12_30 | √ | 实际量产版本 |
|
|
||||||
| aubo_i16 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i16_30 | √ | 实际量产版本 |
|
|
||||||
| aubo_i20 | | 保留型号,兼容之前版本 |
|
|
||||||
| aubo_i20_30 | √ | 实际量产版本,即原本i10B |
|
|
||||||
| aubo_c3_30 | √ | 铂睿谐波 |
|
|
||||||
| aubo_c5_30 | √ | 铂睿谐波+自研电机 |
|
|
||||||
| aubo_e3_10 | √ | 铂睿谐波 |
|
|
||||||
| aubo_e5_10 | √ | 铂睿谐波+自研电机 |
|
|
||||||
| aubo_e10_10 | √ | 自研电机 |
|
|
||||||
| aubo_i5h_30 | √ | 自研电机+三编码器 |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 如何导入一个新的机器人型号
|
|
||||||
|
|
||||||
参考 [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
||||||
|
|
||||||
## 生成校准版 URDF
|
|
||||||
|
|
||||||
可以使用 `scripts/calibrate_urdf_dh.py` 读取机器人 RPC 返回的 DH 校准补偿,并生成新的校准版 URDF 文件。
|
|
||||||
脚本启动时会先检查运行依赖;当前至少需要 `numpy` 和可导入的 `pyaubo_sdk`。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python3 scripts/calibrate_urdf_dh.py \
|
|
||||||
--robot-model aubo_i10H \
|
|
||||||
--robot-ip 192.168.15.128 \
|
|
||||||
--temperature 20
|
|
||||||
```
|
|
||||||
|
|
||||||
也可以直接把 `--urdf-in` 写成机器人名称,脚本会自动到 `urdf/` 目录下查找对应文件:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python3 scripts/calibrate_urdf_dh.py \
|
|
||||||
--urdf-in aubo_i10H \
|
|
||||||
--robot-ip 192.168.15.128 \
|
|
||||||
--temperature 20
|
|
||||||
```
|
|
||||||
|
|
||||||
默认输出路径为 `urdf/<robot_model>_calibrated.urdf`,会直接和其他 `.urdf` 文件放在一起。脚本不会覆盖输入 URDF;若目标文件已存在,需要显式传入 `--force`。
|
|
||||||
|
|
||||||
生成新的校准版 URDF 后,需要重新执行 `colcon build --packages-select aubo_description`,使新文件被正确安装到工作空间。
|
|
||||||
|
|
||||||
# 在 gazebo 中仿真 aubo 机器人(以 aubo_i5 为例)
|
|
||||||
|
|
||||||
roslaunch aubo_gazebo aubo_bringup.launch robot_model:=aubo_i5
|
|
||||||
|
|
||||||
roslaunch aubo_i5_moveit_config moveit_planning_execution.launch sim:=true
|
|
||||||
|
|
||||||
roslaunch aubo_i5_moveit_config moveit_rviz.launch
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user