diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt index f372d7cd..2ee72d31 100644 --- a/tutorials/CMakeLists.txt +++ b/tutorials/CMakeLists.txt @@ -1,3 +1,3 @@ add_subdirectory(kuka_iiwa) add_subdirectory(rh5) -#add_subdirectory(rh5v2) +add_subdirectory(rh5v2) diff --git a/tutorials/rh5v2/CMakeLists.txt b/tutorials/rh5v2/CMakeLists.txt index 0b736d1d..459e3200 100644 --- a/tutorials/rh5v2/CMakeLists.txt +++ b/tutorials/rh5v2/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable(rh5v2 rh5v2.cpp) target_link_libraries(rh5v2 wbc-solvers-qpoases - wbc-scenes-acceleration_tsid + wbc-scenes-velocity_qp wbc-controllers wbc-robot_models-pinocchio) @@ -9,7 +9,7 @@ if(ROBOT_MODEL_HYRODYN) add_executable(rh5v2_hybrid rh5v2_hybrid.cpp) target_link_libraries(rh5v2_hybrid wbc-solvers-qpoases - wbc-scenes-acceleration_tsid + wbc-scenes-velocity_qp wbc-controllers wbc-robot_models-hyrodyn) endif() diff --git a/tutorials/rh5v2/rh5v2.cpp b/tutorials/rh5v2/rh5v2.cpp index dad440a0..55ba9953 100644 --- a/tutorials/rh5v2/rh5v2.cpp +++ b/tutorials/rh5v2/rh5v2.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -63,7 +63,7 @@ int main() // Configure the AccelerationSceneTSID scene. This scene computes joint accelerations, joint torques and contact wrenches as output. // Pass two tasks here: Left arm Cartesian pose and right arm Cartesian pose. - AccelerationSceneTSID scene(robot_model, solver, dt); + VelocitySceneQP scene(robot_model, solver, dt); vector wbc_config; wbc_config.push_back(TaskConfig("cart_ctrl_left", 0, "RH5v2_Root_Link", "ALWristFT_Link", "RH5v2_Root_Link", 1.0)); wbc_config.push_back(TaskConfig("cart_ctrl_right", 0, "RH5v2_Root_Link", "ARWristFT_Link", "RH5v2_Root_Link", 1.0)); @@ -116,7 +116,7 @@ int main() JointIntegrator integrator; double loop_time = dt; // seconds base::commands::Joints solver_output; - for(double t = 0; t < 5; t+=loop_time){ + for(double t = 0; t < 10; t+=loop_time){ // Update the robot model. WBC will only work if at least one joint state with valid timestamp has been passed to the robot model. robot_model->update(joint_state); @@ -160,10 +160,8 @@ int main() cout<<"feedback right qx: "< #include -#include +#include #include #include @@ -40,7 +40,7 @@ int main() // Configure the AccelerationSceneTSID scene. This scene computes joint accelerations, joint torques and contact wrenches as output. // Pass two tasks here: Left arm Cartesian pose and right arm Cartesian pose. - AccelerationSceneTSID scene(robot_model, solver, dt); + VelocitySceneQP scene(robot_model, solver, dt); vector wbc_config; wbc_config.push_back(TaskConfig("cart_ctrl_left", 0, "RH5v2_Root_Link", "ALWristFT_Link", "RH5v2_Root_Link", 1.0)); wbc_config.push_back(TaskConfig("cart_ctrl_right", 0, "RH5v2_Root_Link", "ARWristFT_Link", "RH5v2_Root_Link", 1.0)); @@ -141,8 +141,6 @@ int main() cout<<"Solver output: "; cout<