ServicesNEORACER DOCS
NEORACER DOCS
These docs are public and open source.Edit on GitHub
API REFERENCE / ROS 2

ROS 2 SERVICES.

The stack moves almost everything over , so there is very little here. The only request-and-reply calls in the base build are the two that spin the motor up and down. Everything else you see under ros2 service list is the standard parameter plumbing every node carries.

/start_motor · /stop_motorstd_srvs/Empty
APPLICATION SERVICES

THE MOTOR SERVICES.

ServiceService typeNodeWhat it does
/start_motorstd_srvs/srv/Emptylidar driverSpins the LiDAR motor back up after a stop. Scans return to a full sweep within a second or two.
/stop_motorstd_srvs/srv/Emptylidar driverHalts the spinning mirror. /scan keeps publishing, but every sample reads zero until you start the motor again.
bash
# Stop the LiDAR motor (sweeps go to zero, useful for a quiet bench) ros2 service call /stop_motor std_srvs/srv/Empty # Spin it back up before you drive ros2 service call /start_motor std_srvs/srv/Empty
THE STANDARD SET

THE PARAMETER SERVICES.

When you run ros2 service list you will see a long tail of services under each node name. These are not ours; ROS 2 gives every node the same set so you can inspect and tune it at runtime. And when the osracer and Nav2 stack is running, it advertises its own services and actions on top, map saving, lifecycle transitions, goal handling, far more than the teaching driver here.

  • <node>/get_parameters, set_parameters, list_parameters · read and change a node's parameters while it runs. See Parameters.
  • describe_parameters, get_parameter_types · ask a node what it accepts before you set anything.
//A minimal service of your own
python
import rclpy from rclpy.node import Node from std_srvs.srv import Empty class LapResetter(Node): def __init__(self): super().__init__("lap_resetter") self.create_service(Empty, "/reset_lap", self.on_reset) def on_reset(self, request, response): self.get_logger().info("lap counter cleared") return response def main(): rclpy.init() rclpy.spin(LapResetter())