Skip to content

Multiple changes #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ devel/
build/
.gradle/
*.*~
src/CMakeLists.txt
.catkin_workspace

# Java build artifacts class files
*.class

# other generated files
bin/
gen/
build/

rosjava_actionlib/bin
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class ActionClient<T_ACTION_GOAL extends Message,
* @param actionResultType A string with the type information for the result
* message.
*/
ActionClient (ConnectedNode node, String actionName, String actionGoalType,
public ActionClient (ConnectedNode node, String actionName, String actionGoalType,
String actionFeedbackType, String actionResultType) {
this.node = node;
this.actionName = actionName;
Expand All @@ -103,7 +103,7 @@ public void attachListener(ActionClientListener target) {
*/
public void sendGoal(T_ACTION_GOAL agMessage, String id) {
GoalID gid = getGoalId(agMessage);
if (id == "") {
if (id.equals("")) {
goalIdGenerator.generateID(gid);
} else {
gid.setId(id);
Expand Down Expand Up @@ -293,9 +293,10 @@ public void gotStatus(GoalStatusArray message) {
if (gstat != null) {
// update the goal status tracking
goalManager.updateStatus(gstat.getStatus());
} else {
log.info("Status update is not for our goal!");
}
// else {
// log.info("Status update is not for our goal!");
// }
// Propagate the callback
if (callbackTarget != null) {
callbackTarget.statusReceived(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private class ServerGoal {
* @param actionResultType String holding the type for the action result
* message.
*/
ActionServer (ConnectedNode node, String actionName, String actionGoalType,
public ActionServer (ConnectedNode node, String actionName, String actionGoalType,
String actionFeedbackType, String actionResultType) {
this.node = node;
this.actionName = actionName;
Expand Down Expand Up @@ -314,6 +314,17 @@ public void setSucceed(String goalIdString) {
}
}

/**
* Express a aborted event for this goal. The state of the goal will be updated.
*/
public void setAborted(String goalIdString) {
try {
goalTracker.get(goalIdString).state.transition(ServerStateMachine.Events.ABORT);
}
catch (Exception e) {
}
}

/**
* Set goal ID and state information to the goal status message.
* @param gstat GoalStatus message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static class Events {

private int state;

ServerStateMachine() {
public ServerStateMachine() {
// Initial state
state = GoalStatus.PENDING;
}
Expand Down
File renamed without changes.