Skip to content

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.

License

Notifications You must be signed in to change notification settings

jason914/v2x_object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v2x_object

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.


1) Input JSON (over UDP)

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 angle
  • track_id – stable identifier for the tracked object
  • index – optional sequence/index from the OBU

2) Published topic

  • Topic: /perception/object_recognition/tracking/radar/far_objects
  • Type: /perception/object_recognition/tracking/radar/far_objects

3) Node parameters

  • 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.


4) Build

# Inside your ROS 2 workspace
colcon build --packages-select v2x_object --symlink-install

After building, always source the workspace setup before running:

source install/setup.bash

5) Run

Using the package launch file:

ros2 launch v2x_object v2x_object.launch.xml

This starts the converter node, opens the UDP socket, and begins publishing /perception/object_recognition/tracking/radar/far_objects when JSON messages arrive.


6) Verify at runtime

List topics and HZ:

ros2 topic list | grep far_objects
ros2 topic hz /perception/object_recognition/tracking/radar/far_objects

If everything is wired correctly, you should see objects being published when UDP JSON messages are received.


About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published