Skip to content
Snippets Groups Projects
Commit 9bd6cebd authored by ferranmafe's avatar ferranmafe
Browse files

Added a test for the grippers module.

parent 1aa1f126
No related branches found
No related tags found
No related merge requests found
......@@ -53,4 +53,9 @@ ENDIF(KDL_FOUND)
# create an example application
ADD_EXECUTABLE(darwin_smart_charger_test darwin_smart_charger_test.cpp)
# link necessary libraries
TARGET_LINK_LIBRARIES(darwin_smart_charger_test darwin_robot)
\ No newline at end of file
TARGET_LINK_LIBRARIES(darwin_smart_charger_test darwin_robot)
# create an example application
ADD_EXECUTABLE(darwin_gripper_test darwin_gripper_test.cpp)
# link necessary libraries
TARGET_LINK_LIBRARIES(darwin_gripper_test darwin_robot)
......@@ -7,14 +7,13 @@ std::string robot_device="A603LOBS";
int main(int argc, char *argv[])
{
int i=0,num_v1_servos,num_v2_servos;
std::vector<double> angles;
try{
CDarwinRobot darwin("Darwin",robot_device,1000000,0xC0);
darwin.mm_get_num_servos(&num_v1_servos,&num_v2_servos);
std::cout << "Found " << num_v1_servos << " v1 servos and " << num_v2_servos << " v2 servos" << std::endl;
CDarwinRobot darwin("Darwin",robot_device,1000000,0x02);
std::cout << "Found " << darwin.mm_get_num_servos() << " servos" << std::endl;
darwin.mm_enable_power();
darwin.mm_enable_power_v2();
darwin.mm_enable_servo(24);
darwin.mm_assign_module(24,DARWIN_MM_GRIPPER);
darwin.mm_enable_servo(21);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment