Class ZOROSActionServer<TActionMessage, TGoalMessage>
The actionlib stack provides a standardized interface for interfacing with preemptable tasks.
Examples of this include moving the base to a target location, performing a laser scan and
returning the resulting point cloud, detecting the handle of a door, etc.
https://github.com/ros/actionlib/blob/noetic-devel/actionlib/include/actionlib/server/simple_action_server.h
Inheritance
System.Object
ZOROSActionServer<TActionMessage, TGoalMessage>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Unity.ZeroSim.dll
Syntax
public class ZOROSActionServer<TActionMessage, TGoalMessage> : ZOROSUnityInterface where TActionMessage : ZOROSActionMessageInterface, new()
where TGoalMessage : ZOROSActionGoalMessageInterface, new()
Type Parameters
Name |
Description |
TActionMessage |
|
TGoalMessage |
|
Fields
|
Improve this Doc
View Source
_name
Declaration
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
_ROSTopic
Declaration
Field Value
Type |
Description |
System.String |
|
Properties
|
Improve this Doc
View Source
ActionStatusText
Declaration
public string ActionStatusText { get; protected set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
CurrentGoal
Declaration
public TGoalMessage CurrentGoal { get; protected set; }
Property Value
Type |
Description |
TGoalMessage |
|
|
Improve this Doc
View Source
CurrentGoalActionStatus
The current goal action status. Setting this will set and publish the status of the current goal.
Declaration
public ActionStatusEnum CurrentGoalActionStatus { get; protected set; }
Property Value
|
Improve this Doc
View Source
Name
Unique name of the object. For example: "joint.hinge_from_left_wheel"
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
NextGoal
Declaration
public TGoalMessage NextGoal { get; protected set; }
Property Value
Type |
Description |
TGoalMessage |
|
|
Improve this Doc
View Source
NextGoalActionStatus
The current goal action status. Setting this will set and publish the status of the current goal.
Declaration
public ActionStatusEnum NextGoalActionStatus { get; protected set; }
Property Value
|
Improve this Doc
View Source
OnCancelReceived
Declaration
public Func<ZOROSActionServer<TActionMessage, TGoalMessage>, GoalIDMessage, Task> OnCancelReceived { get; set; }
Property Value
|
Improve this Doc
View Source
OnGoalReceived
On goal action received delegate.
Declaration
public Func<ZOROSActionServer<TActionMessage, TGoalMessage>, TGoalMessage, Task> OnGoalReceived { get; set; }
Property Value
Type |
Description |
System.Func<ZOROSActionServer<TActionMessage, TGoalMessage>, TGoalMessage, System.Threading.Tasks.Task> |
|
|
Improve this Doc
View Source
ROSBridgeConnection
The ROS Bridge singleton shortcut access.
Declaration
protected ZOROSBridgeConnection ROSBridgeConnection { get; }
Property Value
|
Improve this Doc
View Source
ROSTopic
The ROS Topic. For example "/zerosim/joint_states"
Declaration
public string ROSTopic { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ROSUnityManager
The ROS Unity Manger singleton shortcut access.
Declaration
protected ZOROSUnityManager ROSUnityManager { get; }
Property Value
Methods
|
Improve this Doc
View Source
AcceptNewGoal(TGoalMessage)
Accepts a new goal when one is available. The status of this goal is set to active upon
acceptance, and the status of any previously active goal is set to preempted. Preempts
received for the new goal between checking if isNewGoalAvailable or invocation of a goal
callback and the acceptNewGoal call will not trigger a preempt callback. This means,
isPreemptRequested should be called after accepting the goal even for callback-based
implementations to make sure the new goal does not have a pending preempt request.
http://wiki.ros.org/actionlib#SimpleActionServer_Goal_Policies
Declaration
public void AcceptNewGoal(TGoalMessage newGoal)
Parameters
Type |
Name |
Description |
TGoalMessage |
newGoal |
|
|
Improve this Doc
View Source
Initialize()
Will connect to ROS bridge connect and disconnect events.
Declaration
|
Improve this Doc
View Source
OnROSBridgeConnected(ZOROSUnityManager)
Declaration
public void OnROSBridgeConnected(ZOROSUnityManager rosUnityManager)
Parameters
|
Improve this Doc
View Source
OnROSBridgeDisconnected(ZOROSUnityManager)
Declaration
public void OnROSBridgeDisconnected(ZOROSUnityManager rosUnityManager)
Parameters
|
Improve this Doc
View Source
PublishFeedback<T>(T)
Send feedback through the '/feedback' topic.
Declaration
public void PublishFeedback<T>(T feedback)
where T : ZOROSMessageInterface
Parameters
Type |
Name |
Description |
T |
feedback |
|
Type Parameters
|
Improve this Doc
View Source
PublishResult<T>(T)
Publish the final result of the action.
Declaration
protected void PublishResult<T>(T result)
where T : ZOROSMessageInterface
Parameters
Type |
Name |
Description |
T |
result |
|
Type Parameters
|
Improve this Doc
View Source
SetAborted(String)
Set status of the current goal to aborted.
Declaration
public void SetAborted(string reason = "")
Parameters
Type |
Name |
Description |
System.String |
reason |
Optional string explaining the reason for the abort.
|
|
Improve this Doc
View Source
SetCanceled(ZOROSMessageInterface)
Set current goal to recalled or preempted
Declaration
public void SetCanceled(ZOROSMessageInterface result = null)
Parameters
|
Improve this Doc
View Source
SetRejected(String)
Set the status of the NextGoal to rejected.
depending on what the current status of the goal is
Declaration
public void SetRejected(string reason = "")
Parameters
Type |
Name |
Description |
System.String |
reason |
|
|
Improve this Doc
View Source
SetSucceeded(ZOROSMessageInterface, String)
Set the current goal to succeeded.
Declaration
public void SetSucceeded(ZOROSMessageInterface result = null, string info = "")
Parameters
Type |
Name |
Description |
ZOROSMessageInterface |
result |
Optional result message
|
System.String |
info |
Optional additional info
|
|
Improve this Doc
View Source
Terminate()
Will disconnect to ROS bridge connect and disconnect events.
Declaration
Implements