| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ros.Node
Description
The primary entrypoint to the ROS client library portion of roshask. This module defines the actions used to configure a ROS Node.
- data Node a
- runNode :: NodeName -> Node a -> IO ()
- advertise :: (RosBinary a, MsgInfo a, Typeable a) => TopicName -> Topic IO a -> Node ()
- advertiseBuffered :: (RosBinary a, MsgInfo a, Typeable a) => Int -> TopicName -> Topic IO a -> Node ()
- subscribe :: (RosBinary a, MsgInfo a, Typeable a) => TopicName -> Node (Topic IO a)
- getShutdownAction :: Node (IO ())
- runHandler :: (a -> IO b) -> Topic IO a -> Node ThreadId
- getParam :: (XmlRpcType a, FromParam a) => String -> a -> Node a
- getParamOpt :: (XmlRpcType a, FromParam a) => String -> Node (Maybe a)
- getName :: Node String
- getNamespace :: Node String
- module Ros.Internal.RosTypes
- newtype Topic m a = Topic {}
- topicRate :: (Functor m, MonadIO m) => Double -> Topic m a -> Topic m a
- module Ros.Internal.RosTime
- liftIO :: MonadIO m => forall a. IO a -> m a
Documentation
A Node carries with it parameters, topic remappings, and some state encoding the status of its subscriptions and publications.
advertiseBuffered :: (RosBinary a, MsgInfo a, Typeable a) => Int -> TopicName -> Topic IO a -> Node () Source
getShutdownAction :: Node (IO ()) Source
Get an action that will shutdown this Node.
runHandler :: (a -> IO b) -> Topic IO a -> Node ThreadId Source
Spin up a thread within a Node. This is typically used for message handlers. Note that the supplied Topic is traversed solely for any side effects of its steps; the produced values are ignored.
getParam :: (XmlRpcType a, FromParam a) => String -> a -> Node a Source
Get the value associated with the given parameter name. If the parameter is not set, return the second argument as the default value.
getParamOpt :: (XmlRpcType a, FromParam a) => String -> Node (Maybe a) Source
Get the value associated with the given parameter name. If the parameter is not set, then Nothing is returned; if the parameter is set to x, then Just x is returned.
getNamespace :: Node String Source
Get the current namespace.
module Ros.Internal.RosTypes
A Topic is an infinite stream of values that steps between values in a Monad.
Instances
| Functor m => Functor (Topic m) Source | |
| Applicative m => Applicative (Topic m) Source |
topicRate :: (Functor m, MonadIO m) => Double -> Topic m a -> Topic m a Source
The application topicRate rate t runs Topic t no faster than rate Hz.
module Ros.Internal.RosTime