Skip to content

Commit

Permalink
Clean the code from residual personalizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Pretto committed Apr 27, 2015
1 parent b51cd75 commit 0abb16d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion resources/ROS-QUICKSTART
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ rostopic echo /test
$ rosrun <pacakge> <nodename>

# Run sample "gripperstatus_talker" node
$ rosrun robox gripperstatus_talker
$ rosrun gripping_robot gripperstatus_talker

# Request a service
$ rosservice call <nome_servizio> <arguments>
Expand Down
24 changes: 12 additions & 12 deletions samples/raw-api-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static CallbackResponse manyStrings_sub_callback(DynBuffer *buffer, void* data_c
cRosMessage manyStrings;
cRosMessageInit(&manyStrings);
cRosMessageBuild(&manyStrings,
"/home/nico/Desktop/test_msgs/robox/StringMixes.msg");
"/home/nico/Desktop/test_msgs/gripping_robot/StringMixes.msg");
size_t buffer_offset = 0;
cRosMessageDeserialize(&manyStrings, buffer);
return 0;
Expand All @@ -506,7 +506,7 @@ static CallbackResponse manyPoints_sub_callback(DynBuffer *buffer, void* data_co
cRosMessage manyPoints;
cRosMessageInit(&manyPoints);
cRosMessageBuild(&manyPoints,
"/home/nico/Desktop/test_msgs/robox/PointMixes.msg");
"/home/nico/Desktop/test_msgs/gripping_robot/PointMixes.msg");
size_t buffer_offset = 0;
cRosMessageDeserialize(&manyPoints, buffer);
return 0;
Expand All @@ -533,7 +533,7 @@ static CallbackResponse manyStrings_pub_callback(DynBuffer *buffer, void* data_c
cRosMessage* manyStrings = calloc(1,sizeof(cRosMessage));
cRosMessageInit(manyStrings);
cRosMessageBuild(manyStrings,
"/home/nico/Desktop/test_msgs/robox/StringMixes.msg");
"/home/nico/Desktop/test_msgs/gripping_robot/StringMixes.msg");

cRosMessageField* limitedStrings = cRosMessageGetField(manyStrings,"limitedStrings");

Expand All @@ -555,7 +555,7 @@ static CallbackResponse manyPoints_pub_callback(DynBuffer *buffer, void* data_co
cRosMessage manyPoints;
cRosMessageInit(&manyPoints);
cRosMessageBuild(&manyPoints,
"/home/nico/Desktop/test_msgs/robox/PointMixes.msg");
"/home/nico/Desktop/test_msgs/gripping_robot/PointMixes.msg");

cRosMessageField* limitedPoints = cRosMessageGetField(&manyPoints,"limitedPoints");

Expand Down Expand Up @@ -686,18 +686,18 @@ int main(int argc, char **argv)
"uint32[] AlarmCodes\n"
"uint32 Configuration\n\n";

rc = cRosNodeRegisterSubscriber(node, gripperjointstatus_def, "/gripperstatus", "robox/GripperStatus",
rc = cRosNodeRegisterSubscriber(node, gripperjointstatus_def, "/gripperstatus", "gripping_robot/GripperStatus",
"bba69b1f07d275244b4a697ef69e1b2e", gripperstatus_callback, NULL, NULL);
if (rc == -1)
return EXIT_FAILURE;

rc = cRosApiRegisterSubscriber(node, "/gripperjointstate", "robox/GripperJointState",
rc = cRosApiRegisterSubscriber(node, "/gripperjoints", "gripping_robot/GripperJoints",
gripperjointstate_callbacknewapi, getNodeStatusCallback, NULL);
if (rc == -1)
return EXIT_FAILURE;

/*
rc = cRosNodeRegisterSubscriber(node, "float64[9] Position\n\n", "/gripperjointstate", "robox/GripperJointState",
rc = cRosNodeRegisterSubscriber(node, "float64[9] Position\n\n", "/gripperjoints", "gripping_robot/GripperJoints",
"8351d4f138c16ac67e83ce06ead5a2f3", gripperjointstate_callback, NULL, NULL);
if (rc == -1)
return EXIT_FAILURE;
Expand All @@ -721,7 +721,7 @@ int main(int argc, char **argv)

cRosService serviceClamps;
cRosServiceInit(&serviceClamps);
cRosServiceBuild(&serviceClamps,"/home/nico/Desktop/test_msgs/robox/close_clamps.srv");
cRosServiceBuild(&serviceClamps,"/home/nico/Desktop/test_msgs/gripping_robot/CloseGripper.srv");

cRosMessage msgPoint;

Expand All @@ -730,26 +730,26 @@ int main(int argc, char **argv)
cRosMessage msgStringMixes;

cRosMessageInit(&msgStringMixes);
cRosMessageBuild(&msgStringMixes,"/home/nico/Desktop/test_msgs/robox/StringMixes.msg");
cRosMessageBuild(&msgStringMixes,"/home/nico/Desktop/test_msgs/gripping_robot/StringMixes.msg");

cRosMessage msgPointMixes;

cRosMessageInit(&msgPointMixes);
cRosMessageBuild(&msgPointMixes,"/home/nico/Desktop/test_msgs/robox/PointMixes.msg");
cRosMessageBuild(&msgPointMixes,"/home/nico/Desktop/test_msgs/gripping_robot/PointMixes.msg");

rc = cRosNodeRegisterPublisher ( node, msgPoint.msgDef->plain_text, "/point_test", "geometry_msgs/Point",
msgPoint.md5sum, 1000, point_pub_callback, NULL, NULL);
if (rc == -1)
return EXIT_FAILURE;


rc = cRosNodeRegisterPublisher ( node, msgPointMixes.msgDef->plain_text, "/many_points", "robox/PointMixes",
rc = cRosNodeRegisterPublisher ( node, msgPointMixes.msgDef->plain_text, "/many_points", "gripping_robot/PointMixes",
msgPointMixes.md5sum, 1000, manyPoints_pub_callback, NULL, NULL);
if (rc == -1)
return EXIT_FAILURE;


rc = cRosNodeRegisterPublisher ( node, msgStringMixes.msgDef->plain_text, "/many_strings", "robox/StringMixes",
rc = cRosNodeRegisterPublisher ( node, msgStringMixes.msgDef->plain_text, "/many_strings", "gripping_robot/StringMixes",
msgStringMixes.md5sum, 1000, manyStrings_pub_callback, NULL, NULL);
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/cros_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ static CallbackResponse callback_srv_get_loggers(cRosMessage *request, cRosMessa
cRosMessageBuild(logger_msg,path);

cRosMessageField* logger = cRosMessageGetField(logger_msg, "name");
cRosMessageSetFieldValueString(logger, "ros.robox");
cRosMessageSetFieldValueString(logger, "ros.cros_node");
cRosMessageField* level = cRosMessageGetField(logger_msg, "level");
char* str_level = LogLevelToString(node->log_level);
cRosMessageSetFieldValueString(level, str_level);
Expand Down

0 comments on commit 0abb16d

Please sign in to comment.