Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ install/
cloned/
html/
__pycache__

# Pre-built static libraries are attached to GitHub releases as assets, not
# committed. Only the .sha256 checksum is tracked; the .a is downloaded by
# CMake at configure time.
lib/*.a
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
message(FATAL_ERROR "Windows is currently not supported.")
endif()

# Download the pre-built static library from the matching GitHub release and
# verify it against the committed checksum. The .a itself is not tracked in
# this repo, only lib/${SIM_PLUGIN_LIB}.sha256.
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/lib/${SIM_PLUGIN_LIB}.sha256 EXPECTED_HASH)
set(SIM_PLUGIN_LIB_URL https://github.com/flexivrobotics/flexiv_sim_plugin/releases/download/v${PROJECT_VERSION}/${SIM_PLUGIN_LIB})
set(SIM_PLUGIN_LIB_PATH ${CMAKE_CURRENT_BINARY_DIR}/${SIM_PLUGIN_LIB})
message(STATUS "Downloading ${SIM_PLUGIN_LIB_URL} ...")
file(DOWNLOAD ${SIM_PLUGIN_LIB_URL} ${SIM_PLUGIN_LIB_PATH}
SHOW_PROGRESS
TLS_VERIFY ON
EXPECTED_HASH SHA256=${EXPECTED_HASH}
STATUS status)
list(GET status 0 code)
if(code EQUAL 0)
message(STATUS "Download finished")
else()
message(FATAL_ERROR "Download failed: ${status}")
endif()

# ===================================================================
# PROJECT DEPENDENCIES
# ===================================================================
Expand Down
2 changes: 1 addition & 1 deletion cmake/FlexivInstallLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ macro(FlexivInstallLibrary)
# Replace the dummy static lib with the actual static lib
install(CODE
"file(REMOVE ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lib/${SIM_PLUGIN_LIB}
install(FILES ${SIM_PLUGIN_LIB_PATH}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME ${CMAKE_STATIC_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
)
Expand Down
6 changes: 3 additions & 3 deletions include/flexiv/sim_plugin/data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ struct SimRobotStates
* @note This contains values for both the external axes (if any) and the robot manipulator. */
std::vector<float> dq = {};

/** Current wrist force sensor reading of the simulated robot: \f$ [f_x, f_y, f_z] \f$. Unit:
* \f$ [N] \f$. */
/** Current wrist force sensor reading of the simulated robot: \f$ [f_x, f_y, f_z] \f$. Unit: \f$
* [N] \f$. */
std::vector<float> wrist_force = {};

/** Current wrist torque sensor reading of the simulated robot: \f$ [m_x, m_y, m_z] \f$. Unit:
Expand Down Expand Up @@ -83,4 +83,4 @@ struct SimRobotCommands
} /* namespace sim_plugin */
} /* namespace flexiv */

#endif /* FLEXIV_SIM_PLUGIN_DATA_HPP_ */
#endif /* FLEXIV_SIM_PLUGIN_DATA_HPP_ */
Binary file removed lib/libflexiv_sim_plugin.x86_64-linux-gnu.a
Binary file not shown.
1 change: 1 addition & 0 deletions lib/libflexiv_sim_plugin.x86_64-linux-gnu.a.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d95da285eac19eac1d64e5e953a2690f26f4791b9c03d5a9896569717fae6fc0
Loading