Great! Now we are getting some good discussion. Ingo, yes we’ve dived in to actions and solutions before getting clear on the problem statement. We’ve also generated a list of actions that mix both development and process and could be more clearly MECE. We are missing chunks - determanistic message passing requires known allocations of bandwidth - which is available with standards like AVB but not, so far, included on the list - we also need to talk a little bit about hardware. How about if we reformulate the discussion as follows for everyone to throw rocks at:
Ultimate goal: To enable universal robotic service
Current Situation: ROS robots cannot operate safely in many domains due to a lack of predictability and determanism that means sensors can’t be relied on to prevent human injury
Desired Situation: ROS2 robots can guarantee safety in environments with unprotected humans by using sensors and by passing data from those sensors through the ROS2 messaging infrastructure.
Problem Statement: How can we create deterministic responses to sensor inputs in ROS2?
Problem Breakdown
Hardware
- CPU
- uC (I assume most everything attaches to a standard uC and is determanistic to the uC) *
- Communications infrastructure
- High speed (e.g. AVB Ethernet) *
- Low speed (e.g. SLIP)
Software
-
uC RTOS (e.g. NuttX) *
- modifications???
- CPU RTOS (e.g. QMX deriv)
modifications (e.g. patch RT PREEMPT for Linux, etc)
drivers for determanistic communications (e.g. bandwidth allocation on AVB) - Middleware (e.g. DDS and Micro-XRCE-DDS)
- Libraries (rmw, rcl, rclcpp)
- Cleanup for safe implementation
- introduce safe data types (bounded, check type integrity)
- perform memory audit (remove unneeded memory allocations)
- split memory allocation in init and runtime phases, avoid memory fragmentation
- implement real-time safe log output handler (no logging to console or file)
- remove all blocking calls (or replace with timed calls, e.g. mutex vs timed_mutex)
- Cleanup for desirability
- convert ros2 launch to C++
-
Implement real-time pub/sub (either using Waitset or modified Callback/Executor) *
- Real-time pub/sub will need to request bandwidth allocation from shared comms infrastructure (e.g. AVB ethernet)
- Define message length standards
- Other
- Cleanup for safe implementation
- Communications infrastructure firmware *
- Services
- Global error handling (history of failures, core dumps, fail-safe mechanism, …)
- Real-time safety for higher level concepts, e.g.: services, parameters, actions)
Process
- run tools for static and dynamic code analysis (PCLint, LDRA, Silexica, LTT-ng)
- Check everything above in the STL library
- Create reference applications and porting guidelines from ROS1 to ROS2: https://www.apex.ai/blog/porting-algorithms-from-ros-1-to-ros-2 9
- Create CI for RT testing (e.g. https://github.com/ros2/ros2/issues/607#issuecomment-460319513 2) *
- Create BSP
- Create reference applications and porting guidelines from ROS1 to ROS2: https://www.apex.ai/blog/porting-algorithms-from-ros-1-to-ros-2 9
I’d propose to do the bold italic items first with the image of the initial target state being a sensor (say a sonar) passing a message to a motor controller for E-Stop.