Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.9 #32

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
04ff10f
Change readDigitalInput to read all ports at once and real-time non-b…
pzhu-flexiv Aug 18, 2023
df1f5de
Re-write writeDigitalOutput() to support writing to one or multiple p…
pzhu-flexiv Aug 18, 2023
28eba7c
Add maxLinearVel and maxAngularVel input parameters to sendCartesianM…
pzhu-flexiv Aug 18, 2023
1e3b274
Add more behavior description to sendJointPosition()
pzhu-flexiv Aug 18, 2023
bc4cfd9
Replace startAutoRecovery() to runAutoRecovery() that blocks until th…
pzhu-flexiv Aug 18, 2023
c0c3e03
Fix false negative return of isBusy()
pzhu-flexiv Aug 18, 2023
c9f8e35
Add verbose printing to isOperational()
pzhu-flexiv Aug 18, 2023
c591981
Add isEnablingButtonPressed()
pzhu-flexiv Aug 18, 2023
32063b4
Reduce setMode transition time, check fully stop before transition
pzhu-flexiv Aug 18, 2023
21e234e
Change term "operation mode" to "control mode"
pzhu-flexiv Aug 18, 2023
19c819c
Add [Blocking] and [Non-blocking] tag to functions
pzhu-flexiv Aug 18, 2023
dd657ce
Give up gripper control to primitive/plan after calling Gripper::stop()
pzhu-flexiv Aug 18, 2023
da7c7bf
Change Gripper::getGripperStates to real-time non-blocking
pzhu-flexiv Aug 18, 2023
6c4ffa6
Add Log::critical
pzhu-flexiv Aug 18, 2023
a9a7a6f
Remove gravityEarth input parameter to flexiv::Model constructor, aut…
pzhu-flexiv Aug 18, 2023
0645ded
Add utility::arr2Str()
pzhu-flexiv Aug 18, 2023
5696659
Update Linux x86_64 libs
pzhu-flexiv Aug 18, 2023
46f4cf7
Increase cmake minimum version to 3.18.6
pzhu-flexiv Aug 18, 2023
c0aa84b
Bump version number
pzhu-flexiv Aug 18, 2023
6a3fcb2
Sync other cmakelist changes from v1
pzhu-flexiv Aug 18, 2023
0e3f66d
Rename lib
pzhu-flexiv Aug 18, 2023
d97118a
Archive libs follow naming of pybind output
pzhu-flexiv Aug 18, 2023
e9b69b0
Update macOS libs
pzhu-flexiv Aug 18, 2023
d0d8275
Update example and test cmakelists
pzhu-flexiv Aug 18, 2023
9c3e8a0
Update auto recovery examples
pzhu-flexiv Aug 18, 2023
8f514a6
Update test program
pzhu-flexiv Aug 18, 2023
b21ea49
Update version number in doxyfile
pzhu-flexiv Aug 18, 2023
6aa7f0b
Remove Ubuntu 18 from support list
pzhu-flexiv Aug 18, 2023
82ae671
Update windows libs
pzhu-flexiv Aug 18, 2023
d5f2324
update linux arm64 libs
pzhu-flexiv Aug 19, 2023
b9f821c
Examples and tests: add extra wait after the periodic task is termina…
pzhu-flexiv Aug 23, 2023
270d866
Update linux x86_64 libs
pzhu-flexiv Sep 1, 2023
b8e55f6
Change cmake_minimum_required to 3.16.3
pzhu-flexiv Sep 1, 2023
1e9dea2
Update win libs
pzhu-flexiv Sep 1, 2023
0eca9e1
Update macOS libs
pzhu-flexiv Sep 1, 2023
f9fb9bc
Update linux arm64 libs
pzhu-flexiv Sep 1, 2023
71f20cc
Remove NRT/RT_CARTESIAN_MOTION_FORCE_TCP mode, remove _BASE suffix fr…
pzhu-flexiv Sep 12, 2023
290fe18
Change behavior of streamCartesianMotionForce and sendCartesianMotion…
pzhu-flexiv Sep 12, 2023
81d27a6
Divide setCartesianStiffness to setCartesianStiffness and resetCarte…
pzhu-flexiv Sep 12, 2023
df13cab
Divide setNullSpacePosture to setNullSpacePosture and resetNullSpaceP…
pzhu-flexiv Sep 12, 2023
c1578ee
Add setActiveForceControl to switch between active and passive force …
pzhu-flexiv Sep 12, 2023
68e54d3
Add setMaxContactWrench and resetMaxContactWrench
pzhu-flexiv Sep 12, 2023
f02cc85
Update doc order
pzhu-flexiv Sep 12, 2023
1e0ed0c
Add new input parameter continueExec to executePlan to specify hether…
pzhu-flexiv Sep 12, 2023
b12e372
Update Linux x86_64 libs
pzhu-flexiv Sep 12, 2023
a05665f
Change stream/sendCartesianMotionForce to have the same behavior as M…
pzhu-flexiv Sep 19, 2023
db21caf
Add new functions to configure force control parameters
pzhu-flexiv Sep 19, 2023
3f9f006
Rename Model::updateModel() to just update()
pzhu-flexiv Sep 19, 2023
e7e17c8
Add Model::reload() function to refresh local robot and tool model da…
pzhu-flexiv Sep 19, 2023
d02e8e6
Update Linux x86_64 libs
pzhu-flexiv Sep 19, 2023
27efd44
Update Cartesian motion force control C++ and Python examples
pzhu-flexiv Sep 19, 2023
f448e4d
Set continueExec to true for plan execution examples
pzhu-flexiv Sep 19, 2023
9ae31dd
Remove check on secondsWaited of isOperational from examples
pzhu-flexiv Sep 19, 2023
ca43ed7
Rename updateModel to update in examples
pzhu-flexiv Sep 19, 2023
9e09935
Update macOS libs
pzhu-flexiv Sep 19, 2023
bb584fa
Update Windows libs
pzhu-flexiv Sep 19, 2023
c2ca62a
Fix bug in cmakelists
pzhu-flexiv Sep 19, 2023
809225e
Update Linux aarch64 libs
pzhu-flexiv Sep 19, 2023
cbb08f5
Improve joint floating example
pzhu-flexiv Sep 20, 2023
d8601f0
Fix cartesian motion force example
pzhu-flexiv Sep 20, 2023
d3201ae
Format Python examples
pzhu-flexiv Sep 21, 2023
689dfc5
Add missing function doc
pzhu-flexiv Sep 21, 2023
2184409
Update Linux x86_64 libs
pzhu-flexiv Sep 21, 2023
43d51f0
Update macOS libs
pzhu-flexiv Sep 21, 2023
3b92473
Merge branch 'release/v0.9' of https://github.com/flexivrobotics/flex…
pzhu-flexiv Sep 21, 2023
b5a767c
Update Windows libs
pzhu-flexiv Sep 25, 2023
59badcf
Update Linux aarch libs
pzhu-flexiv Sep 25, 2023
629e652
Fix typo in function doc
pzhu-flexiv Oct 3, 2023
b45a7a7
Remove blocking forever from auto recovery examples
pzhu-flexiv Oct 4, 2023
3fec33f
Remove unused variable from example
pzhu-flexiv Oct 4, 2023
d15977e
update example
pzhu-flexiv Oct 4, 2023
dffe3bd
Add doc on valid range of input parameter of setCartesianStiffness
pzhu-flexiv Oct 6, 2023
f1744e5
Replace tilde with en dash
pzhu-flexiv Oct 6, 2023
d4e8877
Remove input parameter of Scheduler::start() for blocking, the user s…
pzhu-flexiv Oct 11, 2023
dca5377
Update Linux x86_64 libs
pzhu-flexiv Oct 11, 2023
6995b2d
Update examples to reflect change in scheduler API
pzhu-flexiv Oct 13, 2023
5c293d2
Update Ubuntu x86_64 libs
pzhu-flexiv Oct 13, 2023
e1a921f
flexiv::Scheduler add minPriority() function; Scheduler::addTask() ad…
pzhu-flexiv Oct 14, 2023
8968844
Update Ubuntu x86_64 libs
pzhu-flexiv Oct 14, 2023
f2465ba
Update macOS libs
pzhu-flexiv Oct 14, 2023
eb278a0
Update Windows libs
pzhu-flexiv Oct 14, 2023
a09a727
Update Ubuntu aarch64 libs
pzhu-flexiv Oct 14, 2023
b656c38
Simplify test_endurance
pzhu-flexiv Oct 19, 2023
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
32 changes: 16 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.16.3)

# ===================================================================
# PROJECT CONFIG
# PROJECT SETUP
# ===================================================================
project(flexiv_rdk VERSION 0.8.0)

# C++14 required
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(flexiv_rdk VERSION 0.9.0)

# Configure build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "CMake build type" FORCE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release" "Debug" "RelWithDebInfo")

# Set static library
message("OS: ${CMAKE_SYSTEM_NAME}")
message("Processor: ${CMAKE_SYSTEM_PROCESSOR}")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libFlexivRdk.x86_64-linux-gnu.a")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libflexiv_rdk.x86_64-linux-gnu.a")
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libFlexivRdk.aarch64-linux-gnu.a")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libflexiv_rdk.aarch64-linux-gnu.a")
else()
message(FATAL_ERROR "Linux with ${CMAKE_SYSTEM_PROCESSOR} processor is currently not supported.")
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libFlexivRdk.arm64-darwin.a")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libflexiv_rdk.arm64-darwin.a")
else()
message(FATAL_ERROR "Mac with ${CMAKE_SYSTEM_PROCESSOR} processor is currently not supported.")
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "AMD64")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/FlexivRdk.win_amd64.lib")
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/lib/flexiv_rdk.win_amd64.lib")
else()
message(FATAL_ERROR "Windows with ${CMAKE_SYSTEM_PROCESSOR} processor is currently not supported.")
endif()
Expand All @@ -42,12 +39,15 @@ endif()
# ===================================================================
# PROJECT DEPENDENCIES
# ===================================================================
# pthread
# Threads
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if(Threads_FOUND)
message(STATUS "Found Threads: HAVE_PTHREAD = ${THREADS_HAVE_PTHREAD_ARG}")
endif()

# ===================================================================
# PROJECT LIBRARIES
# CREATE LIBRARY
# ===================================================================
# Create an INTERFACE library with no source file to compile
add_library(${PROJECT_NAME} INTERFACE)
Expand All @@ -67,10 +67,10 @@ target_link_libraries(${PROJECT_NAME} INTERFACE
)

# Use moderate compiler warning option
if(MSVC)
target_compile_options(${PROJECT_NAME} INTERFACE /W1)
else()
if(CMAKE_HOST_UNIX)
target_compile_options(${PROJECT_NAME} INTERFACE -Wall -Wextra)
else()
target_compile_options(${PROJECT_NAME} INTERFACE /W1)
endif()

# Install the INTERFACE library
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Flexiv RDK (Robotic Development Kit), a key component of the Flexiv Robotic Soft

## Compatibility Overview

| **Supported OS** | **Supported processor** | **Supported language** | **Required compiler kit** |
| ------------------------------ | ----------------------- | ---------------------- | ------------------------- |
| Linux (Ubuntu 18/20/22 tested) | x86_64, arm64 | C++, Python | build-essential |
| macOS 12 (Monterey) | arm64 | C++, Python | Xcode Command Line Tools |
| Windows 10 | x86_64 | C++, Python | MSVC 14.0+ |
| **Supported OS** | **Supported processor** | **Supported language** | **Required compiler kit** |
| -------------------------- | ----------------------- | ---------------------- | ------------------------- |
| Linux (Ubuntu 20.04/22.04) | x86_64, arm64 | C++, Python | build-essential |
| macOS 12 (Monterey) | arm64 | C++, Python | Xcode Command Line Tools |
| Windows 10 | x86_64 | C++, Python | MSVC 14.0+ |

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Flexiv RDK APIs"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "0.8"
PROJECT_NUMBER = "0.9"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
10 changes: 7 additions & 3 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.16.3)
project(flexiv_rdk-examples)

set(CMAKE_CXX_STANDARD 14)
# Show verbose build info
SET(CMAKE_VERBOSE_MAKEFILE ON)

message("OS: ${CMAKE_SYSTEM_NAME}")
message("Processor: ${CMAKE_SYSTEM_PROCESSOR}")
Expand Down Expand Up @@ -44,4 +44,8 @@ find_package(flexiv_rdk REQUIRED)
foreach(example ${EXAMPLE_LIST})
add_executable(${example} ${example}.cpp)
target_link_libraries(${example} flexiv::flexiv_rdk)
# C++14 required
set_target_properties(${example} PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON)
endforeach()
6 changes: 0 additions & 6 deletions example/basics1_display_robot_states.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down
6 changes: 0 additions & 6 deletions example/basics3_primitive_execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down
14 changes: 6 additions & 8 deletions example/basics4_plan_execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down Expand Up @@ -136,7 +130,9 @@ int main(int argc, char* argv[])
log.info("Enter plan index to execute:");
int index;
std::cin >> index;
robot.executePlan(index);
// Allow the plan to continue its execution even if the RDK program is closed or
// the connection is lost
robot.executePlan(index, true);

// Print plan info while the current plan is running
while (robot.isBusy()) {
Expand All @@ -151,7 +147,9 @@ int main(int argc, char* argv[])
log.info("Enter plan name to execute:");
std::string name;
std::cin >> name;
robot.executePlan(name);
// Allow the plan to continue its execution even if the RDK program is closed or
// the connection is lost
robot.executePlan(name, true);

// Print plan info while the current plan is running
while (robot.isBusy()) {
Expand Down
6 changes: 0 additions & 6 deletions example/basics5_zero_force_torque_sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down
6 changes: 0 additions & 6 deletions example/basics6_gripper_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down
8 changes: 2 additions & 6 deletions example/basics7_auto_recovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,10 @@ int main(int argc, char* argv[])
// process is done, so just wait long enough for the process to finish
std::this_thread::sleep_for(std::chrono::seconds(8));

// Start auto recovery if the system is in recovery state, the involved joints will start to
// Run auto recovery if the system is in recovery state, the involved joints will start to
// move back into allowed position range
if (robot.isRecoveryState()) {
robot.startAutoRecovery();
// Block forever, must reboot the robot and restart user program after recovery is done
while (true) {
std::this_thread::sleep_for(std::chrono::seconds(1));
}
robot.runAutoRecovery();
}
// Otherwise the system is normal, do nothing
else {
Expand Down
9 changes: 3 additions & 6 deletions example/intermediate1_realtime_joint_position_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down Expand Up @@ -198,6 +192,9 @@ int main(int argc, char* argv[])
// Start all added tasks, this is by default a blocking method
scheduler.start();

// Wait a bit for any last-second robot log message to arrive and get printed
std::this_thread::sleep_for(std::chrono::seconds(2));

} catch (const flexiv::Exception& e) {
log.error(e.what());
return 1;
Expand Down
9 changes: 3 additions & 6 deletions example/intermediate2_realtime_joint_torque_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down Expand Up @@ -211,6 +205,9 @@ int main(int argc, char* argv[])
// Start all added tasks, this is by default a blocking method
scheduler.start();

// Wait a bit for any last-second robot log message to arrive and get printed
std::this_thread::sleep_for(std::chrono::seconds(2));

} catch (const flexiv::Exception& e) {
log.error(e.what());
return 1;
Expand Down
11 changes: 4 additions & 7 deletions example/intermediate3_realtime_joint_floating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void periodicTask(flexiv::Robot& robot, flexiv::Scheduler& scheduler, flexiv::Lo

// Add some velocity damping
for (size_t i = 0; i < robotDOF; ++i) {
targetTorque[i] = -k_floatingDamping[i] * robotStates.dtheta[i];
targetTorque[i] += -k_floatingDamping[i] * robotStates.dtheta[i];
}

// Send target joint torque to RDK server, enable gravity compensation
Expand Down Expand Up @@ -131,14 +131,8 @@ int main(int argc, char* argv[])
robot.enable();

// Wait for the robot to become operational
int secondsWaited = 0;
while (!robot.isOperational()) {
std::this_thread::sleep_for(std::chrono::seconds(1));
if (++secondsWaited == 10) {
log.warn(
"Still waiting for robot to become operational, please check that the robot 1) "
"has no fault, 2) is in [Auto (remote)] mode");
}
}
log.info("Robot is now operational");

Expand Down Expand Up @@ -166,6 +160,9 @@ int main(int argc, char* argv[])
// Start all added tasks, this is by default a blocking method
scheduler.start();

// Wait a bit for any last-second robot log message to arrive and get printed
std::this_thread::sleep_for(std::chrono::seconds(2));

} catch (const flexiv::Exception& e) {
log.error(e.what());
return 1;
Expand Down
Loading