diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClient.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClient.java index ac4c0b8386bd72b163ce2a416882a3b671b0eb5c..5b90aa822558b899b460da5e92f7cc87b3fb40db 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClient.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClient.java @@ -1,3 +1,19 @@ +/** + * 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; import org.ros.namespace.GraphName; diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClientListener.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClientListener.java index fec5aca1616d559a51d2f6e02d2b802d42e3c23e..bc80d036d51e350c117921833aa306f3a3548abe 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClientListener.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionClientListener.java @@ -1,3 +1,19 @@ +/** + * 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; import org.ros.internal.message.Message; @@ -8,9 +24,28 @@ import actionlib_msgs.GoalStatusArray; * Listener interface to receive the incoming messages from the ActionLib server. * A client should implement this interface if it wants to receive the callbacks * with information from the server. + * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com> */ -public interface ActionClientListener<T_ACTION_FEEDBACK extends Message, T_ACTION_RESULT extends Message> { +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. + */ 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); + + /** + * 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); } diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServer.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServer.java index a2fbed963684ff9871ab376e67ca3ecc6cc37d2d..858f7878ae48306cd34520129ffbadee50980e39 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServer.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServer.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 Creativa77 www.ekumenlab + * 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. diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServerListener.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServerListener.java index 80b4e19cf834994d261c448746eb0d9f98ca7898..42436253818869f61b9a1053229d34274ebd45ee 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServerListener.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ActionServerListener.java @@ -1,3 +1,19 @@ +/** + * 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; import org.ros.internal.message.Message; @@ -8,6 +24,7 @@ import actionlib_msgs.GoalID; * Listener interface to receive the incoming messages from the ActionLib client. * A server should implement this interface if it wants to receive the callbacks * with information from the client. + * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com> */ public interface ActionServerListener<T_ACTION_GOAL extends Message> { /** diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/CommStateMachine.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/CommStateMachine.java index c59e5151b2cd57a87866ce9233776a349b54ed9a..cdc0a2b59e64d0315b12980d3c31e5030eb5984f 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/CommStateMachine.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/CommStateMachine.java @@ -1,13 +1,19 @@ /** - * 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; @@ -17,12 +23,11 @@ import java.util.Iterator; /** * State machine for the action client. - * + * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com> * Comments: * - 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 { // Local class to hold the states public static class ClientStates { diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/GoalIDGenerator.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/GoalIDGenerator.java index 20b0e09b47f448441ea036401b89d44d6f48478f..acf6a1d771b6d62768e2b25b5f333b47fac580d8 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/GoalIDGenerator.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/GoalIDGenerator.java @@ -1,4 +1,5 @@ /* + * Copyright (C) 2015 Ernesto Corbellini, ecorbellini@ekumenlabs.com * Copyright (C) 2011 Alexander Perzylo, Technische Universität München * * Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ServerStateMachine.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ServerStateMachine.java index a7137a56c129aea1961e41c803f7d3b052ed118b..fb335b6af5892eaf4c815453eb8fe41f957420ca 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ServerStateMachine.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/ServerStateMachine.java @@ -1,11 +1,19 @@ /** - * 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; import java.lang.Exception; @@ -13,7 +21,7 @@ import actionlib_msgs.GoalStatus; /* * Class to manage the server state machine transitions. - * @author Ernesto Corbellini + * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com> */ public class ServerStateMachine { public static class Events { diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestClient.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestClient.java index c599f3b0982cff04a05916b6239417d2c45d53e7..b77ed323b5f61e18cf44939c9864c245fad6723e 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestClient.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestClient.java @@ -1,3 +1,19 @@ +/** + * 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; import java.util.List; @@ -15,6 +31,10 @@ import actionlib_msgs.GoalStatusArray; import actionlib_msgs.GoalID; 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> { private ActionClient ac = null; private volatile boolean resultReceived = false; diff --git a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestServer.java b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestServer.java index 31f6d498195a35243b1863ec54246cf9e88c15c7..626da461f1b980525d175f04e04150fadda79f35 100644 --- a/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestServer.java +++ b/src/rosjava_actionlib/rosjava_actionlib/src/main/java/com/github/ekumen/rosjava_actionlib/TestServer.java @@ -1,3 +1,19 @@ +/** + * 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; import java.util.List; @@ -15,6 +31,10 @@ import actionlib_msgs.GoalStatusArray; import actionlib_msgs.GoalID; import actionlib_msgs.GoalStatus; + /** + * Class to test the actionlib server. + * @author Ernesto Corbellini <ecorbellini@ekumenlabs.com> + */ public class TestServer extends AbstractNodeMain implements ActionServerListener<FibonacciActionGoal> { private ActionServer<FibonacciActionGoal, FibonacciActionFeedback, FibonacciActionResult> as = null; private volatile FibonacciActionGoal currentGoal = null;