diff --git a/example/g1/high_level/g1_arm5_sdk_dds_example.cpp b/example/g1/high_level/g1_arm5_sdk_dds_example.cpp index 606687f..5e9addc 100644 --- a/example/g1/high_level/g1_arm5_sdk_dds_example.cpp +++ b/example/g1/high_level/g1_arm5_sdk_dds_example.cpp @@ -70,13 +70,16 @@ int main(int argc, char const *argv[]) { kTopicArmSDK)); arm_sdk_publisher->InitChannel(); - std::array arm_joints = { + std::array arm_joints = { JointIndex::kLeftShoulderPitch, JointIndex::kLeftShoulderRoll, JointIndex::kLeftShoulderYaw, JointIndex::kLeftElbowPitch, JointIndex::kLeftElbowRoll, JointIndex::kRightShoulderPitch, JointIndex::kRightShoulderRoll, JointIndex::kRightShoulderYaw, JointIndex::kRightElbowPitch, - JointIndex::kRightElbowRoll}; + JointIndex::kRightElbowRoll, + JointIndex::kWaistYaw, + JointIndex::kWaistRoll, + JointIndex::kWaistPitch}; float weight = 0.f; float weight_rate = 0.2f; @@ -94,10 +97,11 @@ int main(int argc, char const *argv[]) { auto sleep_time = std::chrono::milliseconds(static_cast(control_dt / 0.001f)); - std::array init_pos{}; + std::array init_pos{}; - std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0.f, - 0.f, -kPi_2, 0.f, kPi_2, 0.f}; + std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0.f, + 0.f, -kPi_2, 0.f, kPi_2, 0.f, + 0.f, 0.f, 0.f}; // wait for init std::cout << "Press ENTER to init arms ..."; @@ -144,7 +148,7 @@ int main(int argc, char const *argv[]) { float period = 5.f; int num_time_steps = static_cast(period / control_dt); - std::array current_jpos_des{}; + std::array current_jpos_des{}; // lift arms up for (int i = 0; i < num_time_steps; ++i) { diff --git a/example/g1/high_level/g1_arm7_sdk_dds_example.cpp b/example/g1/high_level/g1_arm7_sdk_dds_example.cpp index 098dfc4..cac4428 100644 --- a/example/g1/high_level/g1_arm7_sdk_dds_example.cpp +++ b/example/g1/high_level/g1_arm7_sdk_dds_example.cpp @@ -73,7 +73,7 @@ int main(int argc, char const *argv[]) { kTopicArmSDK)); arm_sdk_publisher->InitChannel(); - std::array arm_joints = { + std::array arm_joints = { JointIndex::kLeftShoulderPitch, JointIndex::kLeftShoulderRoll, JointIndex::kLeftShoulderYaw, JointIndex::kLeftElbow, JointIndex::kLeftWistRoll, JointIndex::kLeftWistYaw, @@ -81,7 +81,10 @@ int main(int argc, char const *argv[]) { JointIndex::kRightShoulderPitch, JointIndex::kRightShoulderRoll, JointIndex::kRightShoulderYaw, JointIndex::kRightElbow, JointIndex::kRightWistRoll, JointIndex::kRightWistYaw, - JointIndex::kRightWistPitch}; + JointIndex::kRightWistPitch, + JointIndex::kWaistYaw, + JointIndex::kWaistRoll, + JointIndex::kWaistPitch}; float weight = 0.f; float weight_rate = 0.2f; @@ -99,10 +102,11 @@ int main(int argc, char const *argv[]) { auto sleep_time = std::chrono::milliseconds(static_cast(control_dt / 0.001f)); - std::array init_pos{}; + std::array init_pos{}; - std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0.f, 0.f, 0.f, - 0.f, -kPi_2, 0.f, kPi_2, 0.f, 0.f, 0.f}; + std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0.f, 0.f, 0.f, + 0.f, -kPi_2, 0.f, kPi_2, 0.f, 0.f, 0.f, + 0, 0, 0}; // wait for init std::cout << "Press ENTER to init arms ..."; @@ -149,7 +153,7 @@ int main(int argc, char const *argv[]) { float period = 5.f; int num_time_steps = static_cast(period / control_dt); - std::array current_jpos_des{}; + std::array current_jpos_des{}; // lift arms up for (int i = 0; i < num_time_steps; ++i) {