ROSInterface Plugin API reference
This plugin provides an interface with the ROS API
simROS.advertise
simROS.advertiseService
simROS.call
simROS.deleteParam
simROS.getParamBool
simROS.getParamDouble
simROS.getParamInt
simROS.getParamString
simROS.getTime
Description
|
Return the current ROS time (i.e. the time returned by ros::Time::now()). |
Lua synopsis |
double time=simROS.getTime(int flag=0)
|
Lua parameters |
flag (int, default: 0): unused: set to zero |
Lua return values |
time (double): ROS time expressed in seconds |
See also
|
|
simROS.hasParam
simROS.imageTransportAdvertise
simROS.imageTransportPublish
simROS.imageTransportShutdownPublisher
simROS.imageTransportShutdownSubscriber
simROS.imageTransportSubscribe
simROS.publish
simROS.publisherTreatUInt8ArrayAsString
simROS.searchParam
simROS.sendTransform
Description
|
Publish a TF transformation between frames. |
Lua synopsis |
simROS.sendTransform(table transform)
|
Lua parameters |
transform (table of ): the transformation expressed as a geometry_msgs/TransformStamped message, i.e. {header={stamp=timeStamp, frame_id='...'}, child_frame_id='...', transform={translation={x=..., y=..., z=...}, rotation={x=..., y=..., z=..., w=...}}} |
Lua return values |
- |
See also
|
simROS.advertise simROS.imageTransportAdvertise simROS.imageTransportPublish simROS.imageTransportShutdownPublisher simROS.imageTransportShutdownSubscriber simROS.imageTransportSubscribe simROS.publish simROS.publisherTreatUInt8ArrayAsString simROS.sendTransforms simROS.shutdownPublisher simROS.shutdownSubscriber simROS.subscribe simROS.subscriberTreatUInt8ArrayAsString simROS.sendTransforms
|
simROS.sendTransforms
simROS.serviceClient
simROS.serviceClientTreatUInt8ArrayAsString
simROS.serviceServerTreatUInt8ArrayAsString
simROS.setParamBool
simROS.setParamDouble
simROS.setParamInt
simROS.setParamString
simROS.shutdownPublisher
simROS.shutdownServiceClient
simROS.shutdownServiceServer
simROS.shutdownSubscriber
simROS.subscribe
Description
|
Subscribe to a topic. |
Lua synopsis |
int subscriberHandle=simROS.subscribe(string topicName, string topicType, string topicCallback, int queueSize=1)
|
Lua parameters |
topicName (string): topic name, e.g.: '/cmd_vel'
topicType (string): topic type, e.g.: 'geometry_msgs::Twist'
topicCallback (string): name of the callback function, which will be called with a single argument of type table containing the message payload, e.g.: {linear={x=1.5, y=0.0, z=0.0}, angular={x=0.0, y=0.0, z=-2.3}}
queueSize (int, default: 1): (optional) queue size
|
Lua return values |
subscriberHandle (int): a handle to the ROS subscriber |
See also
|
simROS.advertise simROS.imageTransportAdvertise simROS.imageTransportPublish simROS.imageTransportShutdownPublisher simROS.imageTransportShutdownSubscriber simROS.imageTransportSubscribe simROS.publish simROS.publisherTreatUInt8ArrayAsString simROS.sendTransform simROS.sendTransforms simROS.shutdownPublisher simROS.shutdownSubscriber simROS.subscriberTreatUInt8ArrayAsString
|
simROS.subscriberTreatUInt8ArrayAsString
Script functions
Script functions are used to call some lua code from the plugin side (tipically used for event handlers).
subscriberCallback
Description
|
Callback for ROS subscriber. |
Lua synopsis |
simROS.subscriberCallback(table message)
|
Lua parameters |
message (table of ): the topic payload (i.e. the message) |
Lua return values |
- |
See also
|
|
imageTransportCallback
Description
|
Callback for ROS ImageTransport subscriber. |
Lua synopsis |
simROS.imageTransportCallback(string data, int width, int height)
|
Lua parameters |
data (string): the image data
width (int): image width
height (int): image height
|
Lua return values |
- |
See also
|
|
|