diff --git a/src/examples/darwin_head_tracking_test.cpp b/src/examples/darwin_head_tracking_test.cpp index ad7b46fa2c391e8f8c6476259550f8a362716cfe..5a96650808b49b0247a187219960512336d253b5 100644 --- a/src/examples/darwin_head_tracking_test.cpp +++ b/src/examples/darwin_head_tracking_test.cpp @@ -3,8 +3,8 @@ #include <iostream> -std::string robot_device="A603LOBS"; -//std::string robot_device="A4008atn"; +std::string robot_device="/dev/pts/20"; +//std::string robot_device="A603LOBS"; int main(int argc, char *argv[]) { @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) std::vector<double> angles,speeds,accels; try{ - CDarwinRobot darwin("Darwin",robot_device,1000000,0x02); + CDarwinRobot darwin("Darwin",robot_device,1000000,0x02,true); num_servos=darwin.mm_get_num_servos(); present_servos=darwin.mm_get_present_servos(); diff --git a/src/examples/darwin_joint_motion_test.cpp b/src/examples/darwin_joint_motion_test.cpp index 64d0a27db4b479dfdec8fb0e409d835791bb4d4a..6008e027282ec6d78b5400535eddd4c7cafe2214 100644 --- a/src/examples/darwin_joint_motion_test.cpp +++ b/src/examples/darwin_joint_motion_test.cpp @@ -3,8 +3,8 @@ #include <iostream> -std::string robot_device="A603LOBS"; -//std::string robot_device="A4008atn"; +std::string robot_device="/dev/pts/20"; +//std::string robot_device="A603LOBS"; int main(int argc, char *argv[]) { @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) std::vector<double> angles,speeds,accels; try{ - CDarwinRobot darwin("Darwin",robot_device,1000000,0x02); + CDarwinRobot darwin("Darwin",robot_device,1000000,0x02,true); num_servos=darwin.mm_get_num_servos(); std::cout << "Found " << num_servos << " servos " << std::endl; present_servos=darwin.mm_get_present_servos(); @@ -35,17 +35,9 @@ int main(int argc, char *argv[]) angles.clear(); speeds.clear(); accels.clear(); - servos.push_back(23); - servos.push_back(22); servos.push_back(19); angles.push_back(45.0); - angles.push_back(45.0); - angles.push_back(45.0); - speeds.push_back(50.0); speeds.push_back(50.0); - speeds.push_back(50.0); - accels.push_back(50.0); - accels.push_back(50.0); accels.push_back(50.0); std::cout << "Start joint_motion ..." << std::endl; darwin.joints_load(JOINTS_GRP0,servos,angles,speeds,accels); @@ -59,17 +51,9 @@ int main(int argc, char *argv[]) angles.clear(); speeds.clear(); accels.clear(); - servos.push_back(23); - servos.push_back(22); servos.push_back(19); angles.push_back(-45.0); - angles.push_back(-45.0); - angles.push_back(-45.0); - speeds.push_back(50.0); speeds.push_back(50.0); - speeds.push_back(50.0); - accels.push_back(50.0); - accels.push_back(50.0); accels.push_back(50.0); darwin.joints_load(JOINTS_GRP0,servos,angles,speeds,accels); darwin.joints_start(JOINTS_GRP0); diff --git a/src/examples/darwin_walking_test.cpp b/src/examples/darwin_walking_test.cpp index acd149afbf6af4312520f375bdb413f57adcadde..799aaa9149bdfd8dd42b0dca364e92eadb25258b 100644 --- a/src/examples/darwin_walking_test.cpp +++ b/src/examples/darwin_walking_test.cpp @@ -4,7 +4,8 @@ #include <iostream> -std::string robot_device="A603LOBS"; +std::string robot_device="/dev/pts/20"; +//std::string robot_device="A603LOBS"; //std::string robot_device="A4008atn"; int main(int argc, char *argv[]) @@ -14,7 +15,7 @@ int main(int argc, char *argv[]) unsigned int present_servos; try{ - CDarwinRobot darwin("Darwin",robot_device,1000000,0x02); + CDarwinRobot darwin("Darwin",robot_device,1000000,0x02,true); num_servos=darwin.mm_get_num_servos(); present_servos=darwin.mm_get_present_servos(); std::cout << "Found " << num_servos << " servos" << std::endl; @@ -47,9 +48,9 @@ int main(int argc, char *argv[]) std::cout << "Start walking ..." << std::endl; darwin.walk_set_x_step(0.0); darwin.walk_set_y_step(0.0); - darwin.walk_set_turn_step(0.01); + darwin.walk_set_turn_step(0.04); darwin.walk_start(); - sleep(2); + sleep(10); std::cout << "Stop walking ..." << std::endl; darwin.walk_stop(); while(darwin.is_walking())