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

Pre-release/v1.2 #41

Merged
merged 65 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
18ebf16
Remove Ubuntu 18 support from README
pzhu-flexiv Oct 3, 2023
3dbf336
Add ToolParams struct to Data.hpp
pzhu-flexiv Oct 4, 2023
5ad23b8
Add new API flexiv::Tool to online update robot tools
pzhu-flexiv Oct 4, 2023
9326180
Add new API flexiv::FileIO to do file transfer with the robot
pzhu-flexiv Oct 4, 2023
18d280b
Overload Gripper::getGripperStates
pzhu-flexiv Oct 4, 2023
fe32e25
Merge Cartesian motion force control modes, keep only NRT_CARTESIAN_M…
pzhu-flexiv Oct 4, 2023
8741321
Add Model::reload function
pzhu-flexiv Oct 4, 2023
f9af57e
Fix a root link bug in flexiv::Model
pzhu-flexiv Oct 4, 2023
493e3a3
Add breakpoint control to flexiv::Robot when running plans
pzhu-flexiv Oct 4, 2023
21b7ae6
Reorder functions in flexiv::Robot
pzhu-flexiv Oct 4, 2023
129bdbf
Add Robot::isEnablingButtonPressed
pzhu-flexiv Oct 4, 2023
7bc6fda
Overload Robot::getRobotStates
pzhu-flexiv Oct 4, 2023
549dabc
Add new input parameter continueExec to executePlan to allow continue…
pzhu-flexiv Oct 4, 2023
bd3e7b4
Change Robot::getPlanInfo to return data struct directly
pzhu-flexiv Oct 4, 2023
30957e5
Add more function doc to Robot::sendJointPosition
pzhu-flexiv Oct 4, 2023
4c74879
Redesign the behavior of streamCartesianMotionForce and sendCartesia…
pzhu-flexiv Oct 4, 2023
5034952
Add force control configuration functions: setForceControlAxis, setFo…
pzhu-flexiv Oct 4, 2023
ba7bcb6
Update linux x86_64 libs
pzhu-flexiv Oct 4, 2023
3425672
Remove check on secondsWaited of isOperational from examples
pzhu-flexiv Oct 4, 2023
77fdb6d
Format Python examples
pzhu-flexiv Oct 4, 2023
5892cec
Update motion force control examples
pzhu-flexiv Oct 4, 2023
b76ef2b
Update macOS libs
pzhu-flexiv Oct 4, 2023
2eb7703
Update "base" to "world"
pzhu-flexiv Oct 4, 2023
56417bc
Rename extWrenchInBase to extWrenchInWorld, update doc
pzhu-flexiv Oct 4, 2023
b153461
Sync the c++ static libs naming pattern to be the same as python libs
pzhu-flexiv Oct 5, 2023
012e28d
Bump project version number to 1.2.0
pzhu-flexiv Oct 5, 2023
097054e
Update linux x86_64 libs
pzhu-flexiv Oct 5, 2023
ff5a430
Fix compilation
pzhu-flexiv Oct 5, 2023
4e4b6d5
Update macOS libs
pzhu-flexiv Oct 5, 2023
3e60f75
Update Windows libs
pzhu-flexiv Oct 5, 2023
e18f1e9
Change return of Tool::getCurrentToolName() from "NONE" to "Flange"
pzhu-flexiv Oct 19, 2023
08017bf
flexiv::Scheduler add minPriority() function; Scheduler::addTask() ad…
pzhu-flexiv Oct 19, 2023
e5f2a35
Remove input parameter of Scheduler::start() for blocking, the user s…
pzhu-flexiv Oct 19, 2023
f818e8c
Improve Robot function doc, add doc on valid range of input parameters
pzhu-flexiv Oct 19, 2023
17b9858
Robot::setForceControlAxis() add new input parameter to limit moving …
pzhu-flexiv Oct 19, 2023
e60838c
Update ubuntu x86_64 libs
pzhu-flexiv Oct 19, 2023
073868a
Update examples according to Scheduler update
pzhu-flexiv Oct 19, 2023
dba4b34
Update test_endurance
pzhu-flexiv Oct 19, 2023
22cc222
Update macOS libs
pzhu-flexiv Oct 19, 2023
0b5dea2
Enable robot dynamics for windows
pzhu-flexiv Oct 21, 2023
bf60047
Update windows x64 libs
pzhu-flexiv Oct 21, 2023
9e507c9
Update dynamics engine test
pzhu-flexiv Oct 21, 2023
1a2aacd
Update README on MSVC compatible version
pzhu-flexiv Oct 23, 2023
cb2a11f
Remove HINTS ${CMAKE_INSTALL_PREFIX} from cmakelists
pzhu-flexiv Oct 23, 2023
6c361a0
Fix Python examples
pzhu-flexiv Oct 25, 2023
d82c580
Fix missing velocity scale in plan execution examples
pzhu-flexiv Oct 25, 2023
b9d6d28
Update Ubuntu x86_64 libs
pzhu-flexiv Oct 26, 2023
193dc31
Remove RobotStates::camPose, no longer available
pzhu-flexiv Oct 27, 2023
ce63465
Update Ubuntu x86_64 libs
pzhu-flexiv Oct 27, 2023
18713c8
Update Ubuntu x86_64 libs with scheduler bugfix
pzhu-flexiv Nov 10, 2023
1375068
Update Ubuntu x86_64 libs
pzhu-flexiv Nov 22, 2023
d18e8b5
Update macOS arm64 libs
pzhu-flexiv Nov 22, 2023
095e6e1
Update Ubuntu aarch64 libs
pzhu-flexiv Nov 22, 2023
e2d46fb
Update Windows amd64 libs
pzhu-flexiv Nov 23, 2023
d8637b9
Fix typo in README
pzhu-flexiv Nov 28, 2023
501d521
Remove camPose from example
pzhu-flexiv Nov 28, 2023
5a22306
Add update robot tool cpp and python examples
pzhu-flexiv Nov 30, 2023
eddd781
Update Copyright year from 2021 to 2023
pzhu-flexiv Nov 30, 2023
997615a
Merge test_dynamics_with_tool into test_dynamics_engine
pzhu-flexiv Nov 30, 2023
cc1a77f
Decrease cmake_minimum_required from 3.18.6 to 3.16.3
pzhu-flexiv Nov 30, 2023
044c529
Use Windows 2019 runner instead of 2022 to avoid a MSVC compatibility…
pzhu-flexiv Nov 30, 2023
0c3df73
Add macOS runner
pzhu-flexiv Nov 30, 2023
d680c92
Use $(sysctl -n hw.ncpu) to replace $(nproc) for macOS
pzhu-flexiv Nov 30, 2023
a3725ce
Use MSVC v142 to compile windows libs
pzhu-flexiv Dec 1, 2023
61548b5
Use self-hosted runner for macOS arm64 tasks
pzhu-flexiv Dec 1, 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
63 changes: 46 additions & 17 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ env:

jobs:
build-ubuntu-22:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# Use Ubuntu 22.04 runner
runs-on: ubuntu-22.04

steps:
Expand All @@ -27,7 +24,7 @@ jobs:
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)

- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
Expand All @@ -54,10 +51,7 @@ jobs:
make -j$(nproc)

build-ubuntu-20:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# Use Ubuntu 20.04 runner
runs-on: ubuntu-20.04

steps:
Expand All @@ -68,7 +62,7 @@ jobs:
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)

- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
Expand All @@ -94,12 +88,9 @@ jobs:
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)

build-windows-2022:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-2022
build-macos-12:
# Use self-hosted macOS 12 runner with arm64 processor
runs-on: [self-hosted, macos-12, ARM64]

steps:
- uses: actions/checkout@v2
Expand All @@ -109,7 +100,45 @@ jobs:
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install
bash build_and_install_dependencies.sh ~/rdk_install $(sysctl -n hw.ncpu)

- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install

- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(sysctl -n hw.ncpu)

- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(sysctl -n hw.ncpu)

build-windows-2019:
# Use Windows 2019 runner because the 2022 runner uses a MSVC version that's too new for one of the dependencies
runs-on: windows-2019

steps:
- uses: actions/checkout@v2

- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)

- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
Expand Down
24 changes: 12 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.18.6)
cmake_minimum_required(VERSION 3.16.3)

# ===================================================================
# PROJECT SETUP
# ===================================================================
project(flexiv_rdk VERSION 1.1.0)
project(flexiv_rdk VERSION 1.2.0)

# Configure build type
if(NOT CMAKE_BUILD_TYPE)
Expand All @@ -16,21 +16,21 @@ 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/libflexiv_rdk.linux-gnu-x86_64.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/libflexiv_rdk.linux-gnu-aarch64.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/libflexiv_rdk.darwin-arm64.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/flexiv_rdk.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 @@ -47,19 +47,19 @@ if(Threads_FOUND)
endif()

# Eigen3
find_package(Eigen3 REQUIRED HINTS ${CMAKE_INSTALL_PREFIX})
find_package(Eigen3 REQUIRED)
if(Eigen3_FOUND)
message(STATUS "Found Eigen3: ${Eigen3_DIR}")
endif()

# Fast-CDR
find_package(fastcdr 1.0.24 REQUIRED HINTS ${CMAKE_INSTALL_PREFIX})
find_package(fastcdr 1.0.24 REQUIRED)
if(fastcdr_FOUND)
message(STATUS "Found fastcdr: ${fastcdr_DIR}")
endif()

# Fast-DDS (Fast-RTPS)
find_package(fastrtps 2.6.2 REQUIRED HINTS ${CMAKE_INSTALL_PREFIX})
find_package(fastrtps 2.6.2 REQUIRED)
if(fastrtps_FOUND)
message(STATUS "Found fastrtps: ${fastrtps_DIR}")
endif()
Expand All @@ -70,11 +70,11 @@ endif()
# Create an INTERFACE library with no source file to compile
add_library(${PROJECT_NAME} INTERFACE)

# Create an alias of the library using flexiv namespace,
# Create an alias of the library using flexiv namespace,
# to imitate the install target which uses flexiv namespace.
add_library(flexiv::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

target_include_directories(${PROJECT_NAME} INTERFACE
target_include_directories(${PROJECT_NAME} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
Expand All @@ -87,7 +87,7 @@ target_link_libraries(${PROJECT_NAME} INTERFACE
fastcdr
)

# Use moderate compiler warning option
# Use moderate compiler warning option
if(CMAKE_HOST_UNIX)
target_compile_options(${PROJECT_NAME} INTERFACE -Wall -Wextra)
else()
Expand Down
24 changes: 14 additions & 10 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 All @@ -34,7 +34,7 @@ NOTE: if you will only be using Python RDK, you can skip this section and jump t
sudo apt install build-essential git cmake cmake-qt-gui -y

2. Choose a directory for installing ``flexiv_rdk`` library and all its dependencies. For example, a new folder named ``rdk_install`` under the home directory.
3. In a new Terminal, run the provided script to compile and install all dependencies to the installation directory chosen in step 1:
3. In a new Terminal, run the provided script to compile and install all dependencies to the installation directory chosen in step 2:

cd flexiv_rdk/thirdparty
bash build_and_install_dependencies.sh ~/rdk_install
Expand Down Expand Up @@ -82,10 +82,14 @@ NOTE: if you will only be using Python RDK, you can skip this section and jump t

#### Compile and install for Windows

1. Install Microsoft Visual Studio with version 2015 or above (MSVC 14.0+). Choose the "Desktop development with C++" package during installation.
2. Download ``cmake-3.x.x-windows-x86_64.msi`` from [CMake download page](https://cmake.org/download/) and install the msi file. The minimum required version is 3.16.3. **Add CMake to system PATH** when prompted, so that ``cmake`` and ``cmake-gui`` command can be used from Command Prompt or a bash emulator.
3. Install a bash emulator. Git Bash that comes with Git (for Windows) installation is recommended.
4. Within the bash emulator, the rest steps are the same as [Compile and install for Linux](#compile-and-install-for-linux), beginning from step 2.
1. Install Microsoft Visual Studio with version 2015 or above (MSVC 14.0+). Choose "Desktop development with C++" under the *Workloads* tab during installation. You only need to keep the following components for the selected workload:
* MSVC ... C++ x64/x86 build tools (Latest)
* C++ CMake tools for Windows
* Windows 10 SDK or Windows 11 SDK, depending on your actual Windows version
2. Due to compatibility issue from one of the dependencies, the maximum compatible MSVC version is v14.36. Thus if the above selected "Latest" MSVC is higher than v14.36, an **additional** compatible MSVC needs to be installed. To do so, go to the *Individual components* tab (next to *Workloads*), and search for "MSVC x64/x86 build tools", then select a MSVC with version <= 14.36 to install. Note: you need to also **keep** the "Latest" selection of MSVC that comes with the "Desktop development with C++" workload so that the "C++ CMake tools for Windows" component can work properly.
3. Download ``cmake-3.x.x-windows-x86_64.msi`` from [CMake download page](https://cmake.org/download/) and install the msi file. The minimum required version is 3.16.3. **Add CMake to system PATH** when prompted, so that ``cmake`` and ``cmake-gui`` command can be used from Command Prompt or a bash emulator.
4. Install a bash emulator. Git Bash that comes with Git (for Windows) installation is recommended.
5. Within the bash emulator, the rest steps are the same as [Compile and install for Linux](#compile-and-install-for-linux), beginning from step 2.

### Python RDK

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 = "1.1"
PROJECT_NUMBER = "1.2"

# 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
9 changes: 5 additions & 4 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.18.6)
cmake_minimum_required(VERSION 3.16.3)
project(flexiv_rdk-examples)

# Show verbose build info
Expand All @@ -21,10 +21,11 @@ set(EXAMPLE_LIST
basics5_zero_force_torque_sensors
basics6_gripper_control
basics7_auto_recovery
basics8_update_robot_tool
intermediate6_robot_dynamics
intermediate7_teach_by_demonstration
)


# Additional examples for Linux and Mac
if(CMAKE_HOST_UNIX)
list(APPEND EXAMPLE_LIST
Expand All @@ -33,7 +34,6 @@ if(CMAKE_HOST_UNIX)
intermediate3_realtime_joint_floating
intermediate4_realtime_cartesian_pure_motion_control
intermediate5_realtime_cartesian_motion_force_control
intermediate6_robot_dynamics
)
endif()

Expand All @@ -44,8 +44,9 @@ find_package(flexiv_rdk REQUIRED)
foreach(example ${EXAMPLE_LIST})
add_executable(${example} ${example}.cpp)
target_link_libraries(${example} flexiv::flexiv_rdk)

# C++17 required
set_target_properties(${example} PROPERTIES
set_target_properties(${example} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON)
endforeach()
18 changes: 4 additions & 14 deletions example/basics1_display_robot_states.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @example basics1_display_robot_states.cpp
* This tutorial does the very first thing: check connection with the robot server and print
* received robot states.
* @copyright Copyright (C) 2016-2021 Flexiv Ltd. All Rights Reserved.
* @copyright Copyright (C) 2016-2023 Flexiv Ltd. All Rights Reserved.
* @author Flexiv
*/

Expand Down Expand Up @@ -37,16 +37,12 @@ void printHelp()
/** @brief Print robot states data @ 1Hz */
void printRobotStates(flexiv::Robot& robot, flexiv::Log& log)
{
// Data struct storing robot states
flexiv::RobotStates robotStates;

while (true) {
// Get the latest robot states
robot.getRobotStates(robotStates);

// Print all robot states in JSON format using the built-in ostream operator overloading
// Note: because this is not a performance-critical loop, we can use the
// return-by-value-copy version of getRobotStates()
log.info("Current robot states:");
std::cout << robotStates << std::endl;
std::cout << robot.getRobotStates() << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
Expand Down Expand Up @@ -95,14 +91,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
2 changes: 1 addition & 1 deletion example/basics2_clear_fault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @example basics2_clear_fault.cpp
* This tutorial clears minor faults from the robot server if any. Note that critical faults cannot
* be cleared, see RDK manual for more details.
* @copyright Copyright (C) 2016-2021 Flexiv Ltd. All Rights Reserved.
* @copyright Copyright (C) 2016-2023 Flexiv Ltd. All Rights Reserved.
* @author Flexiv
*/

Expand Down
8 changes: 1 addition & 7 deletions example/basics3_primitive_execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @example basics3_primitive_execution.cpp
* This tutorial executes several basic robot primitives (unit skills). For detailed documentation
* on all available primitives, please see [Flexiv Primitives](https://www.flexiv.com/primitives/).
* @copyright Copyright (C) 2016-2021 Flexiv Ltd. All Rights Reserved.
* @copyright Copyright (C) 2016-2023 Flexiv Ltd. All Rights Reserved.
* @author Flexiv
*/

Expand Down Expand Up @@ -79,14 +79,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
Loading
Loading