From 712fc7c7b2f5c560a1d4e4ff4fae5f3deb72b484 Mon Sep 17 00:00:00 2001 From: Agnel Wang <59766821+Agnel-Wang@users.noreply.github.com> Date: Thu, 9 Feb 2023 10:32:09 +0800 Subject: [PATCH] c++14 is required --- CMakeLists.txt | 5 +++-- examples_py/example_highcmd.py | 2 ++ examples_py/example_lowcmd.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31c829e..f05ebbb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.0) project(z1_sdk) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -pthread") - +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread") +set(CMAKE_CXX_STANDARD_REQUIRED on) +set(CMAKE_CXX_STANDARD 14) set(EIGEN_PATH /usr/include/eigen3) include_directories( include diff --git a/examples_py/example_highcmd.py b/examples_py/example_highcmd.py index 111ec19..06c9a60 100644 --- a/examples_py/example_highcmd.py +++ b/examples_py/example_highcmd.py @@ -4,6 +4,8 @@ import unitree_arm_interface import time import numpy as np +print("Press ctrl+\ to quit process.") + np.set_printoptions(precision=3, suppress=True) arm = unitree_arm_interface.ArmInterface(hasGripper=True) armState = unitree_arm_interface.ArmFSMState diff --git a/examples_py/example_lowcmd.py b/examples_py/example_lowcmd.py index 2b7723d..af8a49e 100644 --- a/examples_py/example_lowcmd.py +++ b/examples_py/example_lowcmd.py @@ -4,6 +4,8 @@ import unitree_arm_interface import time import numpy as np +print("Press ctrl+\ to quit process.") + np.set_printoptions(precision=3, suppress=True) arm = unitree_arm_interface.ArmInterface(hasGripper=True) armModel = arm._ctrlComp.armModel