MCPcopy Create free account
hub / github.com/AimRT/AimRT / ros2_callback_wrapper

Function ros2_callback_wrapper

src/runtime/python_runtime/aimrt_py_chn.py:197–204  ·  view source on GitHub ↗
(ctx_ref: aimrt_python_runtime.ContextRef, msg)

Source from the content-addressed store, hash-verified

195 py_ros2_ts.SetSerializationTypesSupportedList(["ros2"])
196
197 def ros2_callback_wrapper(ctx_ref: aimrt_python_runtime.ContextRef, msg):
198 try:
199 if required_param_count == 1:
200 callback(msg)
201 else:
202 callback(ctx_ref, msg)
203 except Exception as e:
204 print(f"AimRT channel handle get exception, {e}", file=sys.stderr)
205
206 aimrt_py_ros2.Ros2SubscribeWithCtx(subscriber, py_ros2_ts, msg_type, ros2_callback_wrapper)
207

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected