======================================================================
use_ros LIVE SHOWCASE - in-process rclpy against a real turtlesim
======================================================================

### use_ros(action='status')
[success] backend: rclpy (in-process)

### use_ros(action='list_topics')
[success] /parameter_events [rcl_interfaces/msg/ParameterEvent]
/rosout [rcl_interfaces/msg/Log]
/turtle1/cmd_vel [geometry_msgs/msg/Twist]
/turtle1/color_sensor [turtlesim/msg/Color]
/turtle1/pose [turtlesim/msg/Pose]
/turtle1/rotate_absolute/_action/feedback [turtlesim/action/RotateAbsolute_FeedbackMessage]
/turtle1/rotate_absolute/_action/status [action_msgs/msg/GoalStatusArray]

### use_ros(action='list_nodes')
[success] /strands_robots_use_ros
/turtlesim

### use_ros(action='list_services')
[success] /clear [std_srvs/srv/Empty]
/kill [turtlesim/srv/Kill]
/reset [std_srvs/srv/Empty]
/spawn [turtlesim/srv/Spawn]
/strands_robots_use_ros/describe_parameters [rcl_interfaces/srv/DescribeParameters]
/strands_robots_use_ros/get_parameter_types [rcl_interfaces/srv/GetParameterTypes]
/strands_robots_use_ros/get_parameters [rcl_interfaces/srv/GetParameters]
/strands_robots_use_ros/get_type_description [type_description_interfaces/srv/GetTypeDescription]
/strands_robots_use_ros/list_parameters [rcl_interfaces/srv/ListParameters]
/strands_robots_use_ros/set_parameters [rcl_interfaces/srv/SetParameters]

### use_ros(action='info', topic='/turtle1/cmd_vel')
[success] topic info /turtle1/cmd_vel:
  type(s): geometry_msgs/msg/Twist
  publishers: 0
  subscribers: 1

### use_ros(action='echo', topic='/turtle1/pose', count=1, timeout=3.0)
[success] echo /turtle1/pose (turtlesim/msg/Pose):
[
  {
    "x": 5.544444561004639,
    "y": 5.544444561004639,
    "theta": 0.0,
    "linear_velocity": 0.0,
    "angular_velocity": 0.0
  }
]

### use_ros(action='publish', topic='/turtle1/cmd_vel', type='geometry_msgs/msg/Twist', fields={'linear': {'x': 2.0}, 'angular': {'z': 1.8}}, count=20, rate=10.0)
[success] published 20 message(s) to /turtle1/cmd_vel

### use_ros(action='echo', topic='/turtle1/pose', count=1, timeout=3.0)
[success] echo /turtle1/pose (turtlesim/msg/Pose):
[
  {
    "x": 4.428230285644531,
    "y": 6.499973297119141,
    "theta": -1.4447853565216064,
    "linear_velocity": 2.0,
    "angular_velocity": 1.7999999523162842
  }
]

### use_ros(action='service_call', service='/spawn', type='turtlesim/srv/Spawn', fields={'x': 2.0, 'y': 2.0, 'theta': 0.0, 'name': 't2'})
[success] response:
{
  "name": "t2"
}

### use_ros(action='list_topics')
[success] /parameter_events [rcl_interfaces/msg/ParameterEvent]
/rosout [rcl_interfaces/msg/Log]
/t2/cmd_vel [geometry_msgs/msg/Twist]
/t2/color_sensor [turtlesim/msg/Color]
/t2/pose [turtlesim/msg/Pose]
/t2/rotate_absolute/_action/feedback [turtlesim/action/RotateAbsolute_FeedbackMessage]
/t2/rotate_absolute/_action/status [action_msgs/msg/GoalStatusArray]
/turtle1/cmd_vel [geometry_msgs/msg/Twist]
/turtle1/color_sensor [turtlesim/msg/Color]
/turtle1/pose [turtlesim/msg/Pose]
/turtle1/rotate_absolute/_action/feedback [turtlesim/action/RotateAbsolute_FeedbackMessage]
/turtle1/rotate_absolute/_action/sta

### use_ros(action='echo', topic='/turtle1/pose', type='nonexistent_pkg/msg/Foo')
[error] use_ros: echo failed: No module named 'nonexistent_pkg'

### use_ros(action='echo', topic='/bad; rm -rf')
[error] use_ros: invalid topic name: '/bad; rm -rf'

======================================================================
PROOF: pose changed via use_ros publish (in-process rclpy, no CLI):
  before: (5.544444561004639, 5.544444561004639, 0.0)
  after:  (4.428230285644531, 6.499973297119141, -1.4447853565216064)
======================================================================
PASS: a real ROS 2 turtle was driven and read back through use_ros.
