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

Added license information to the sources.

parent 544115ce
No related branches found
No related tags found
No related merge requests found
Showing
with 135 additions and 13 deletions
/**
* Copyright 2015 Ekumen www.ekumenlabs.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
import org.ros.namespace.GraphName; import org.ros.namespace.GraphName;
......
/**
* Copyright 2015 Ekumen www.ekumenlabs.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
import org.ros.internal.message.Message; import org.ros.internal.message.Message;
...@@ -8,9 +24,28 @@ import actionlib_msgs.GoalStatusArray; ...@@ -8,9 +24,28 @@ import actionlib_msgs.GoalStatusArray;
* Listener interface to receive the incoming messages from the ActionLib server. * Listener interface to receive the incoming messages from the ActionLib server.
* A client should implement this interface if it wants to receive the callbacks * A client should implement this interface if it wants to receive the callbacks
* with information from the server. * with information from the server.
* @author Ernesto Corbellini <ecorbellini@ekumenlabs.com>
*/
public interface ActionClientListener<T_ACTION_FEEDBACK extends Message,
T_ACTION_RESULT extends Message> {
/**
* Called when a result message is received from the server.
* @param result Result message from the server. The type of this message
* depends on the application.
*/ */
public interface ActionClientListener<T_ACTION_FEEDBACK extends Message, T_ACTION_RESULT extends Message> {
void resultReceived(T_ACTION_RESULT result); void resultReceived(T_ACTION_RESULT result);
/**
* Called when a feedback message is received from the server.
* @param feedback The feedback message received from the server. The type of
* this message depends on the application.
*/
void feedbackReceived(T_ACTION_FEEDBACK feedback); void feedbackReceived(T_ACTION_FEEDBACK feedback);
/**
* Called when a status message is received from the server.
* @param status The status message received from the server.
* @see actionlib_msgs.GoalStatusArray
*/
void statusReceived(GoalStatusArray status); void statusReceived(GoalStatusArray status);
} }
/** /**
* Copyright 2015 Creativa77 www.ekumenlab * Copyright 2015 Ekumen www.ekumenlabs.com
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/**
* Copyright 2015 Ekumen www.ekumenlabs.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
import org.ros.internal.message.Message; import org.ros.internal.message.Message;
...@@ -8,6 +24,7 @@ import actionlib_msgs.GoalID; ...@@ -8,6 +24,7 @@ import actionlib_msgs.GoalID;
* Listener interface to receive the incoming messages from the ActionLib client. * Listener interface to receive the incoming messages from the ActionLib client.
* A server should implement this interface if it wants to receive the callbacks * A server should implement this interface if it wants to receive the callbacks
* with information from the client. * with information from the client.
* @author Ernesto Corbellini <ecorbellini@ekumenlabs.com>
*/ */
public interface ActionServerListener<T_ACTION_GOAL extends Message> { public interface ActionServerListener<T_ACTION_GOAL extends Message> {
/** /**
......
/** /**
* Copyright (c) 2015, Ernesto Corbellini, Ekumen * Copyright 2015 Ekumen www.ekumenlabs.com
* *
* Based on actionlib code by Stuart Glaser, Willow Garage * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* Pending license. * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
...@@ -17,12 +23,11 @@ import java.util.Iterator; ...@@ -17,12 +23,11 @@ import java.util.Iterator;
/** /**
* State machine for the action client. * State machine for the action client.
* * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com>
* Comments: * Comments:
* - The state returned on a transition is actually a vector of states that should be transitioned in sequence. * - The state returned on a transition is actually a vector of states that should be transitioned in sequence.
* * TODO: change class name to ClientStateMachine
*/ */
// TODO: change class name to ClientStateMachine
public class CommStateMachine { public class CommStateMachine {
// Local class to hold the states // Local class to hold the states
public static class ClientStates { public static class ClientStates {
......
/* /*
* Copyright (C) 2015 Ernesto Corbellini, ecorbellini@ekumenlabs.com
* Copyright (C) 2011 Alexander Perzylo, Technische Universität München * Copyright (C) 2011 Alexander Perzylo, Technische Universität München
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not * Licensed under the Apache License, Version 2.0 (the "License"); you may not
......
/** /**
* Copyright (c) 2015, Ernesto Corbellini, Ekumen * Copyright 2015 Ekumen www.ekumenlabs.com
* *
* Pending license. * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
import java.lang.Exception; import java.lang.Exception;
...@@ -13,7 +21,7 @@ import actionlib_msgs.GoalStatus; ...@@ -13,7 +21,7 @@ import actionlib_msgs.GoalStatus;
/* /*
* Class to manage the server state machine transitions. * Class to manage the server state machine transitions.
* @author Ernesto Corbellini * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com>
*/ */
public class ServerStateMachine { public class ServerStateMachine {
public static class Events { public static class Events {
......
/**
* Copyright 2015 Ekumen www.ekumenlabs.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
import java.util.List; import java.util.List;
...@@ -15,6 +31,10 @@ import actionlib_msgs.GoalStatusArray; ...@@ -15,6 +31,10 @@ import actionlib_msgs.GoalStatusArray;
import actionlib_msgs.GoalID; import actionlib_msgs.GoalID;
import actionlib_msgs.GoalStatus; import actionlib_msgs.GoalStatus;
/**
* Class to test the actionlib client.
* @author Ernesto Corbellini <ecorbellini@ekumenlabs.com>
*/
public class TestClient extends AbstractNodeMain implements ActionClientListener<FibonacciActionFeedback, FibonacciActionResult> { public class TestClient extends AbstractNodeMain implements ActionClientListener<FibonacciActionFeedback, FibonacciActionResult> {
private ActionClient ac = null; private ActionClient ac = null;
private volatile boolean resultReceived = false; private volatile boolean resultReceived = false;
......
/**
* Copyright 2015 Ekumen www.ekumenlabs.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.ekumen.rosjava_actionlib; package com.github.ekumen.rosjava_actionlib;
import java.util.List; import java.util.List;
...@@ -15,6 +31,10 @@ import actionlib_msgs.GoalStatusArray; ...@@ -15,6 +31,10 @@ import actionlib_msgs.GoalStatusArray;
import actionlib_msgs.GoalID; import actionlib_msgs.GoalID;
import actionlib_msgs.GoalStatus; import actionlib_msgs.GoalStatus;
/**
* Class to test the actionlib server.
* @author Ernesto Corbellini <ecorbellini@ekumenlabs.com>
*/
public class TestServer extends AbstractNodeMain implements ActionServerListener<FibonacciActionGoal> { public class TestServer extends AbstractNodeMain implements ActionServerListener<FibonacciActionGoal> {
private ActionServer<FibonacciActionGoal, FibonacciActionFeedback, FibonacciActionResult> as = null; private ActionServer<FibonacciActionGoal, FibonacciActionFeedback, FibonacciActionResult> as = null;
private volatile FibonacciActionGoal currentGoal = null; private volatile FibonacciActionGoal currentGoal = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment