Interfaces and Ports#
This page lists the public interfaces of ACRES, their ports and the page that describes each interface.
The Interfaces#
| Interface | Use | Page |
|---|---|---|
| Command-line options | Configure and start a session of the game. | Command-Line Options, Option Index |
| Console and config options | The console variables, the engine settings and the environment variables. | Console and Config Options |
| Menu settings | The values of the front-end menu. | Menu Settings |
| Vehicle bridge | Send commands to one vehicle and read its reports on a JSON socket. | Vehicle Bridge |
| Simulator control channel | Pause, step, reset, change conditions and record on a JSON socket. | Simulator Control Channel |
| Sensor stream | Read the sensor data of one vehicle on a binary socket. | Sensor Stream |
| ROS 2 nodes | The packages, nodes, launch files and the DDS loopback fence. | Nodes and Launch Files |
| ROS 2 topics | The topics of the Polaris and the Maxxum with their types, rates and QoS. | Topics |
| ROS 2 services | The simulation_interfaces services, the action and the ACRES services. |
Services and Actions |
| ROS 2 messages | The definitions of acres_interfaces. |
Messages |
| ACRES Core, Python | The module acres_core with the batch of environments. |
Python API |
| ACRES Core, C++ | The library libacres_core and its tools. |
C++ API |
| File formats | The session log, the episode log, the configuration files and the map products. | Session Log, Episode Log, Configuration Files, Map Products |
| Tools and scripts | The tools of the repository. | Tools and Scripts |
| C++ headers | The public declarations of each header. | C++ Headers |
Ports#
All sockets listen on 127.0.0.1 only. The game opens a socket only when its option gives a port.
The game has no default port. The ROS 2 launch files, the Core server and the Python clients use the ports of this table as their defaults.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
-SimControl= |
TCP port | 5600 | The simulator control channel. One channel for a session. | |
-SensorStream= |
TCP port | 5601 | The sensor stream of agent 0. -SensorStreams= gives one port for each agent. |
|
-RlPort= |
TCP port | 5556 | The vehicle bridge of agent 0. -RlPorts= gives one port for each agent. |
|
-RlCanUdp= |
UDP port | none | The J1939 CAN bus of the Maxxum as CAN frames in UDP datagrams. | |
-RlCan= |
interface | none | The same CAN bus on a SocketCAN interface (Linux). |
The Core server core_sim gives each additional agent the port of the agent before it plus 10.
| Program | Options for the Ports |
|---|---|
| The game | -SimControl=5600 -SensorStream=5601 -RlPort=5556 |
ros2 launch acres_sim sim_bridge.launch.py |
control_port:=5600 sensor_port:=5601 rl_port:=5556 can_udp_port:=0 |
ros2 launch acres_core_sim core_sim.launch.py |
The same launch arguments. |
core_sim |
--control-port 5600 --sensor-ports 5601 --rl-ports 5556 |
Tools/SimControl/sim_control.py |
SimControl(port=5600) |
The ROS 2 environment uses the domain identifier 77. Its UDP ports are 26660 to 26789 on the loopback interface.
Which Interface to Use#
| Task | Interface |
|---|---|
| Drive a vehicle from a Python program without ROS 2 | The vehicle bridge. |
| Run ROS 2 software of the real Polaris against the simulator | The ROS 2 bridge acres_sim with the topics of the vehicle. |
| Step the simulation from a learner | The simulator control channel, or the service /step_simulation of the ROS 2 bridge. |
| Train with many environments | The Python API of ACRES Core. |
| Connect a CAN device or an ISOBUS program to the Maxxum | The CAN bus over UDP or SocketCAN. |
| Read recorded data | The file formats. |
Stability#
ACRES has no numbered release. The interfaces can change.
| Interface | Version Marker |
|---|---|
| Simulator control channel | The key protocol of the hello reply. The value is 1. |
| Episode log | The metadata record acres_episode and the library name acres-episode-log 1. |
| Field setup, rig map | The format identifier in the file, for example acres-field-setup-1. |
Generated Pages#
The build generates four parts of this section from the source code: C++ Headers, Messages, Menu Settings and Option Index.
Run mkdocs build --strict to generate them again.
Write Documentation describes the generator.
A check compares the reference pages with the source code.
The check fails when a command-line option, a message of acres_interfaces or a name of the acres_core module is not on its reference page.