Bases: builtins.object
The class is inherited by all serializers/deserializers. Concrete classes need to implement default().
Bases: morse.core.datastream.DatastreamManager
Handle communication between Blender and MOOS.
Bases: morse.middleware.abstract_datastream.AbstractDatastream
Bases: morse.middleware.abstract_datastream.AbstractDatastream
Bases: morse.core.datastream.DatastreamManager
Handle communication between Blender and Pocolibs.
Bases: morse.core.request_manager.RequestManager
Implements Pocolibs requests to control the MORSE simulator.
This is done by re-implementing (parts of) the TCLserv protocol.
The ROS ‘datastream manager’ is responsible for ROS topic management in MORSE. It publishes simulated sensors and subscribes to topics controlling simulated actuators.
As you may have noticed, the morse.middleware.ros_datastream.ROSDatastreamManager class is actually empty: contrary to sockets, for instance, that always use direct JSON serialization of MORSE Python objects, there is no generic way to encode/decode ROS messages.
Thus, morse/middleware/ros contains one specific serialization/deserialization class for each sensor/actuator. These classes inherit either from morse.middleware.ros.abstract_ros.ROSPublisher or from:py:class:morse.middleware.ros.abstract_ros.ROSSubscriber.
If you want to add support for a new type of topic, you likely want to add it as a new serialization implementation in this directory.
Note also that management of ROS services and ROS actions takes place in ros_request_manager.py.
Bases: morse.core.datastream.DatastreamManager
Handle communication between Blender and ROS.
Bases: builtins.object
Implements a minimal action state machine.
See http://www.ros.org/wiki/actionlib/DetailedDescription for the possible states.
Bases: morse.core.request_manager.RequestManager
Dynamically creates custom ROS->MORSE dispatchers for ROS services only.
ROS actions are dealt with in the RosAction class.
We create here ROS services (for synchronous services) and ROS actions (for asynchronous services).
In order not to interfere with neither ROS own service wrapping mechanism or MORSE service invokation mechanisms, we create here, ‘on the fly’, handlers for each service exposed through ROS.
ROS requires type for the services/actions. Those can be set with the ros_action() and ros_service() decorators. If none is set, the action/service is discarded.
The @ros_action decorator.
This decorator is very similar to the standard morse.core.services.async_service() decorator. It sets a class method to be a asynchronous service, exposed as a ROS action of type type.
This decorator can only be used on methods in classes inheriting from morse.core.object.Object.
Parameters: |
|
---|
The @ros_service decorator.
This decorator is very similar to the standard morse.core.services.service() decorator. It sets a free function or class method to be a (synchronous) service, exposed as a ROS service of type type.
This decorator works both with free function and for methods in classes inheriting from morse.core.object.Object. In the former case, you must specify a component (your service will belong to this namespace), in the later case, it is automatically set to the name of the corresponding MORSE component.
Parameters: |
|
---|
Bases: json.encoder.JSONEncoder
Bases: morse.core.datastream.DatastreamManager
External communication using sockets.
Bases: morse.core.request_manager.RequestManager
Implements services to control the MORSE simulator over raw ASCII sockets.
The syntax of requests is:
>>> id component_name service [params with Python syntax]
id is an identifier set by the client to conveniently identify the request. It must be less that 80 chars in [a-zA-Z0-9].
The server answers:
>>> id status result_in_python|error_msg
status is one of the constants defined in morse.core.status.
Bases: morse.middleware.abstract_datastream.AbstractDatastream
Bases: morse.core.datastream.DatastreamManager
Produce text files as output for the components
Bases: morse.core.datastream.DatastreamManager
Handle communication between Blender and YARP.
Bases: morse.middleware.abstract_datastream.AbstractDatastream
Bases: morse.core.request_manager.RequestManager
Implements services to control the MORSE simulator over YARP
The syntax of requests is: >>> id component_name service [params with Python syntax]
‘id’ is an identifier set by the client to conveniently identify the request. It must be less that 80 chars in [a-zA-Z0-9].
The server answers: >>> id OK|FAIL result_in_python|error_msg
Bases: morse.core.request_manager.RequestManager
Implements services to control the MORSE simulator over YARP
The syntax of requests is: >>> id component_name service [params with Python syntax]
‘id’ is an identifier set by the client to conveniently identify the request. It must be less that 80 chars in [a-zA-Z0-9].
The server answers: >>> id OK|FAIL result_in_python|error_msg