A ROS 2 node that listens for JSON messages from an OBU over UDP, converts each message into a radar object message, and publishes them on the /perception/object_recognition/tracking/radar/far_objects topic.
This package is intended to bridge external V2X/OBU detections to ROS 2 pipelines by translating a compact JSON schema into radar object messages consumable by other nodes.
Each incoming datagram must contain a single JSON object. Example:
{"Radar_Info":{"class_id":1,"center_point_x":89571.15340041213,"center_point_y":42301.19088692708,"center_point_z":-3.1588221269747856,"speed":22,"bearing":36.0,"track_id":12,"index":21062}}Expected keys (under Radar_Info):
class_id– object class/category id (integer)center_point_x,center_point_y,center_point_z– object position (numeric, units depend on your OBU configuration)speed– object speed (unit : m/sec)bearing– heading or bearing angletrack_id– stable identifier for the tracked objectindex– optional sequence/index from the OBU
- Topic:
/perception/object_recognition/tracking/radar/far_objects - Type: /perception/object_recognition/tracking/radar/far_objects
ip_address– IPv4 address to bind the UDP socket (e.g., your Network Interface Card that receives OBU data)port– UDP port to listen on
These parameters are typically set in the launch file of this package. Edit them as needed before launching.
# Inside your ROS 2 workspace
colcon build --packages-select v2x_object --symlink-installAfter building, always source the workspace setup before running:
source install/setup.bashUsing the package launch file:
ros2 launch v2x_object v2x_object.launch.xmlThis starts the converter node, opens the UDP socket, and begins publishing /perception/object_recognition/tracking/radar/far_objects when JSON messages arrive.
List topics and HZ:
ros2 topic list | grep far_objects
ros2 topic hz /perception/object_recognition/tracking/radar/far_objectsIf everything is wired correctly, you should see objects being published when UDP JSON messages are received.