EPICS value topic
Monitor one EPICS PV and republish each callback value as ROS Float64 on relative pv_value. Assumes scalar float-convertible data and does not preserve EPICS timestamps/metadata.
bluesky_ros.pv_to_topic · Source
Clients and integrations · Guide · Symbol index
How it is used
Start this adapter with the EPICS PV name as its positional argument. PVBridge registers an EPICS monitor and republishes its updates on the relative ROS topic pv_value; main() keeps the ROS node running.
The PV must produce scalar values convertible to float. The ROS Float64 message carries only the value, without the original EPICS timestamp or metadata.
Start here
Callable |
Purpose |
|---|---|
Require a PV name, initialize ROS and spin the monitor bridge. |
|
Convert the callback value to float and publish a Float64 message. |
Functions
main()
Require a PV name, initialize ROS and spin the monitor bridge.
Entry point · Source
main()
Returns: Returns only if spin returns; missing argument exits with usage text.
Errors: No exception/interrupt cleanup logic.
Side effects: Starts ROS/EPICS monitoring; does not explicitly remove monitor or shut down ROS.
PVBridge
Translate EPICS monitor callbacks into Float64 publications for one configured PV.
Inherits from: Node.
PVBridge.on_change()
Convert the callback value to float and publish a Float64 message.
Callback · Source
on_change(self, value=None, **kw)
Parameter |
Meaning |
|---|---|
|
Scalar EPICS value; default None cannot be converted and raises if delivered unchanged. |
|
Additional EPICS callback metadata; ignored. |
Returns: None.
Errors: TypeError/ValueError for nonnumeric data and publisher failures propagate.
Side effects: Publishes one ROS value per EPICS update.
Referenced in source (1)
PVBridge.__init__— bluesky_ros.pv_to_topic
PVBridge.__init__()
Create a depth-ten Float64 publisher and register an EPICS camonitor callback for the requested PV.
Lifecycle · Source
__init__(self, pvname)
Parameter |
Meaning |
|---|---|
|
EPICS process-variable name passed to camonitor. |
Errors: ROS/EPICS setup errors propagate.
Side effects: Starts an EPICS monitor, registers ROS publisher and logs the mapping; monitor handle is not retained.
Referenced in source (1)
main— bluesky_ros.pv_to_topic