• Articles
  • Api Documentation
Show / Hide Table of Contents
  • AsyncGPUReadbackPluginNs
    • AsyncGPUReadbackPlugin
    • AsyncGPUReadbackPluginRequest
  • ZO
    • ZOMouseOrbitCamera
  • ZO.Controllers
    • ZO2FingerGripController
    • ZOLinearActuator
    • ZOLinearActuator.Axis
    • ZOServoMotorActuator
  • ZO.Document
    • ZOSerializationInterface
    • ZOSimDocumentRoot
    • ZOSimOccurrence
  • ZO.Math
    • ZOGaussianNoiseModel
    • ZOMathUtil
    • ZOMatrix4x4Util
    • ZORandom
  • ZO.Networking
    • ZOBinaryMessagePublisher
    • ZOBinaryMessageSubscriber
    • ZOJSONMessagePublisher
    • ZOJSONMessageSubscriber
    • ZOPubSubHeader
    • ZOTCPServer
  • ZO.Physics
    • ZOArticulatedBody
    • ZOFixedJoint
    • ZOHingeJoint
    • ZOJointInterface
    • ZOPIDController
    • ZOSpeedLimiter
  • ZO.ROS
    • ZOROSActionServer<TActionMessage, TGoalMessage>
    • ZOROSAPI
    • ZOROSBridgeConnection
    • ZOROSBridgeConnection.ROSBridgeConnectionChangeHandler
    • ZOROSBridgeConnection.SerializationType
  • ZO.ROS.Controllers
    • ControllerStateEnum
    • ZOArmController
    • ZODifferentialDriveController
    • ZOROSControllerInterface
  • ZO.ROS.MessageTypes
    • ZOROSMessageInterface
  • ZO.ROS.MessageTypes.ActionLib
    • ActionStatusEnum
    • GoalIDMessage
    • GoalStatusArrayMessage
    • GoalStatusMessage
    • ZOROSActionGoalMessageInterface
    • ZOROSActionMessageInterface
  • ZO.ROS.MessageTypes.Control
    • FollowJointTrajectoryActionFeedback
    • FollowJointTrajectoryActionGoal
    • FollowJointTrajectoryActionMessage
    • FollowJointTrajectoryActionResult
    • FollowJointTrajectoryFeedback
    • FollowJointTrajectoryGoal
    • FollowJointTrajectoryResult
    • JointToleranceMessage
    • JointTrajectoryControllerStateMessage
  • ZO.ROS.MessageTypes.ControllerManager
    • ControllerStateMessage
    • HardwareInterfaceResourcesMessage
    • ListControllersResponse
    • ListControllerTypesServiceResponse
    • LoadControllerServiceRequest
    • LoadControllerServiceResponse
    • ReloadControllerLibrariesServiceRequest
    • ReloadControllerLibrariesServiceResponse
    • SwitchControllerServiceRequest
    • SwitchControllerServiceResponse
    • UnloadControllerServiceRequest
    • UnloadControllerServiceResponse
  • ZO.ROS.MessageTypes.Gazebo
    • SpawnModelServiceRequest
    • SpawnModelServiceResponse
  • ZO.ROS.MessageTypes.Geometry
    • PointMessage
    • PoseMessage
    • PoseWithCovarianceMessage
    • QuaternionMessage
    • TransformMessage
    • TransformStampedMessage
    • TwistMessage
    • TwistWithCovarianceMessage
    • Vector3Message
  • ZO.ROS.MessageTypes.Nav
    • OdometryMessage
  • ZO.ROS.MessageTypes.ROSAPI
    • GetParamNamesResponse
    • GetParamResponse
    • GetParamServiceRequest
    • HasParamResponse
    • HasParamServiceRequest
    • SetParamServiceRequest
  • ZO.ROS.MessageTypes.ROSGraph
    • ClockMessage
  • ZO.ROS.MessageTypes.Sensor
    • CameraInfoMessage
    • ImageMessage
    • ImuMessage
    • JointStateMessage
    • LaserScanMessage
    • RegionOfInterestMessage
  • ZO.ROS.MessageTypes.Std
    • DurationMessage
    • EmptyServiceRequest
    • EmptyServiceRespone
    • HeaderMessage
    • Int32Message
    • SetBoolServiceRequest
    • SetBoolServiceResponse
    • StringMessage
    • TimeMessage
  • ZO.ROS.MessageTypes.TF2
    • TFMessage
  • ZO.ROS.MessageTypes.Trajectory
    • JointTrajectoryMessage
    • JointTrajectoryPointMessage
  • ZO.ROS.MessageTypes.ZOSim
    • ZOSimDeleteModelRequest
    • ZOSimDeleteModelResponse
    • ZOSimPrefabSpawnRequest
    • ZOSimPrefabSpawnResponse
    • ZOSimSpawnServiceRequest
    • ZOSimSpawnServiceResponse
  • ZO.ROS.Publisher
    • ZOROSImagePublisher
    • ZOROSIMUPublisher
    • ZOROSIMUPublisher.CoordinateSystemEnum
    • ZOROSJointStatesPublisher
    • ZOROSLaserScanPublisher
    • ZOROSRGBDepthPublisher
    • ZOROSStereoImagePublisher
    • ZOROSTransformPublisher
  • ZO.ROS.Unity
    • ZOROSUnityGameObjectBase
    • ZOROSUnityInterface
    • ZOROSUnityManager
    • ZOROSUnityManager.ROSBridgeConnectionChangeHandler
  • ZO.ROS.Unity.Docker
    • ZOROSLaunchParameters
  • ZO.ROS.Unity.Service
    • ZOControllerManagerService
    • ZOSimDeleteModelService
    • ZOSimPrefabSpawnService
    • ZOSimResetSimulationService
    • ZOSimSpawnService
  • ZO.Sensors
    • ZOContactDetector
    • ZOContactSwitchDualChannel
    • ZOIMU
    • ZOLIDAR2D
    • ZOLIDAR3D
    • ZOLIDAR3D.ReferenceFrame
    • ZORaycastJobBatch
    • ZORGBCamera
    • ZORGBDepthCamera
    • ZORGBDepthCamera.FrameOutputType
  • ZO.Util
    • ZOCenterOfMass
    • ZOClock
    • ZODocker
    • ZODocker.VolumeMapEntry
    • ZODockerRunParameters
    • ZODrawArc
    • ZODrawCircle
    • ZOEarthUtils
    • ZOEarthUtils.GeoPoint
    • ZOEarthUtils.HomeGeoPoint
    • ZOFrequencyCounter
    • ZOFrequencyCounter.TimeSourceType
    • ZOGameObjectBase
    • ZOMagnetometer
    • ZOMoveTest
    • ZOMoveTest.MoveTypeEnum
    • ZORandomizePhysics
    • ZORandomizeTransform
    • ZOReadOnlyAttribute
    • ZOSystem
    • ZOTurnOffSelfCollision
  • ZO.Util.Extensions
    • ZOJSONExtensions
  • ZO.Util.Rendering
    • ZOAsyncGPUReadbackPlugin
    • ZOAsyncGPUReadbackPluginRequest

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>
Implements
ZOROSUnityInterface
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()
Namespace: ZO.ROS
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
public string _name
Field Value
Type Description
System.String
| Improve this Doc View Source

_ROSTopic

Declaration
public string _ROSTopic
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
Type Description
ActionStatusEnum
| 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
Type Description
ActionStatusEnum
| Improve this Doc View Source

OnCancelReceived

Declaration
public Func<ZOROSActionServer<TActionMessage, TGoalMessage>, GoalIDMessage, Task> OnCancelReceived { get; set; }
Property Value
Type Description
System.Func<ZOROSActionServer<TActionMessage, TGoalMessage>, GoalIDMessage, System.Threading.Tasks.Task>
| 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
Type Description
ZOROSBridgeConnection
| 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
Type Description
ZOROSUnityManager

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
public void Initialize()
| Improve this Doc View Source

OnROSBridgeConnected(ZOROSUnityManager)

Declaration
public void OnROSBridgeConnected(ZOROSUnityManager rosUnityManager)
Parameters
Type Name Description
ZOROSUnityManager rosUnityManager
| Improve this Doc View Source

OnROSBridgeDisconnected(ZOROSUnityManager)

Declaration
public void OnROSBridgeDisconnected(ZOROSUnityManager rosUnityManager)
Parameters
Type Name Description
ZOROSUnityManager rosUnityManager
| 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
Name Description
T
| 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
Name Description
T
| 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
Type Name Description
ZOROSMessageInterface result
| 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
public void Terminate()

Implements

ZOROSUnityInterface
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX