Skip to content
Snippets Groups Projects
Commit 35b68ded authored by Ernesto Corbellini's avatar Ernesto Corbellini
Browse files

Fix issues so it compiles.

parent 91382ede
Branches
Tags
No related merge requests found
......@@ -237,7 +237,7 @@ public class ActionGoal<T_ACTION_GOAL extends Message, T_GOAL extends Message> {
}
public boolean equals(ActionGoal<T_ACTION_GOAL> ag) {
public boolean equals(ActionGoal ag) {
return (this.getGoalId() == ag.getGoalId());
}
}
......@@ -16,6 +16,7 @@
package com.github.ekumen.rosjava_actionlib;
import org.ros.internal.message.Message;
import actionlib_msgs.GoalID;
import actionlib_msgs.GoalStatus;
......@@ -23,17 +24,17 @@ import actionlib_msgs.GoalStatus;
* Class that binds and action goal with a state machine to track its state.
* @author Ernesto Corbellini ecorbellini@ekumenlabs.com
*/
public class ClientGoalManager<T_ACTION_GOAL extends Message> {
public ActionGoal<T_ACTION_GOAL> actionGoal = null;
public class ClientGoalManager<T_ACTION_GOAL extends Message, T_GOAL extends Message> {
public ActionGoal<T_ACTION_GOAL, T_GOAL> actionGoal = null;
public ClientStateMachine stateMachine = null;
public void sendGoal(ActionGoal<T_ACTION_GOAL> ag) {
public void sendGoal(ActionGoal<T_ACTION_GOAL, T_GOAL> ag) {
actionGoal = ag;
stateMachine = new ClientStateMachine();
stateMachine.setState(ClientStateMachine.ClientStates.WAITING_FOR_GOAL_ACK);
}
public boolean cancelGoal() {
return stateMachine.cancelGoal();
return stateMachine.cancel();
}
}
......@@ -417,8 +417,8 @@ public class ClientStateMachine {
* @return True if the goal can be cancelled, false otherwise.
*/
public boolean cancel() {
bolean ret = false;
switch (stateMachine.getState()) {
boolean ret = false;
switch (state) {
case ClientStates.WAITING_FOR_GOAL_ACK:
case ClientStates.PENDING:
case ClientStates.ACTIVE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment