Skip to content

Latest commit

 

History

History
143 lines (121 loc) · 6.28 KB

DRIVERS.md

File metadata and controls

143 lines (121 loc) · 6.28 KB

ROS Drivers for common V2X OBU/RSU Hardware

The etsi_its_conversion package converts etsi_its_msgs ROS messages to and from UPER-encoded udp_msgs/msg/UdpPacket payloads. This allows to build simple ROS drivers for common V2X OBUs and RSUs. This page contains instructions to connect common V2X hardware to ROS.

Tested V2X Hardware

Approach

  • Run an application on the MK5/MK6 that forwards raw V2X message payloads to a UDP port on a host computer.
  • Bridge the UDP packets to ROS messages.
  • Run the etsi_its_conversion node to convert the UDP packets to and from etsi_its_msgs ROS messages.

Prerequisites

  • To follow the documentation links, access to the Cohda Wireless support portal is required.
  • The MK5/MK6 is connected to a host computer and IP addresses of both devices are known.
  • The following was tested successfully with MK5 firmware mk5-19.Release.139237-RSUETSI-typical and a stock MK6 firmware.
  • The following only describes the setup for bridging received V2X messages to ROS. The other way, sending V2X messages from ROS via ITS-G5, should work similarly.

On the Cohda Wireless MK5/MK6

  1. Install the exampleETSI application to /mnt/rw. [Documentation] You may also install and configure any other (custom) application that supports forwarding V2X messages via UDP.
  2. Configure forwarding of BTP packets to the host computer via UDP in /mnt/rw/exampleETSI/obu.conf or /mnt/rw/exampleETSI/rsu.conf. [Documentation]
    ItsFacilitiesShellEnabled   = 1;     0, 1         # Enables / Disables support Facilities Shell interface
    ItsUdpBtpIfHostName     = 192.168.140.12          # hostname for sending BTP Data Ind to Shell
    ItsUdpBtpIfIndPort      = 4400;  1,65535          # port number for sending BTP Data Ind to Shell
    ItsUdpBtpIfReqPort      = 4401;  1,65535          # port number for receiving BTP Data Req from Shell
    ItsBtpShellDestPort     = 65535; 0,65535
    
  3. (optional) Reduce GeoNetworking security strictness in the same file.
    ItsGnSnDecapResultHandling = 1; 0,1               # GN security strictness - STRICT (0), NON-STRICT (1)
    
  4. Start the application or enable auto-start. [Documentation]
    # root@MK5:/mnt/rw/exampleETSI#
    rc.exampleETSI start obu # or rsu

On the host computer

  1. Install the udp_driver and etsi_its_conversion ROS packages.
    sudo apt install \
        ros-$ROS_DISTRO-transport-drivers \
        ros-$ROS_DISTRO-etsi-its-conversion
  2. Configure the udp_driver node responsible for bridging the UDP packets received from the MK5/MK6 to udp_msgs/msg/UdpPacket ROS messages.
    # config.udp_driver.yml
    /**/*:
      ros__parameters:
        ip: "192.168.140.12"    # same as ItsUdpBtpIfIndHostName
        port: 4400              # same as ItsUdpBtpIfIndPort
  3. Configure the etsi_its_conversion node responsible for converting the UPER-encoded udp_msgs/msg/UdpPacket payloads to etsi_its_msgs.
    # config.etsi_its_conversion.yml
    /**/*:
      ros__parameters:
        has_btp_destination_port: true
        btp_destination_port_offset: 8
        etsi_message_payload_offset: 78
        ros2udp_etsi_types:
          - cam
          - cam_ts
          - cpm_ts
          - denm
          - mapem_ts
          - spatem_ts
          - vam_ts
        udp2ros_etsi_types:
          - cam
          - cpm_ts
          - denm
          - mapem_ts
          - spatem_ts
          - vam_ts
  4. Launch the udp_driver node.
    ros2 run udp_driver udp_receiver_node_exe --ros-args --params-file ./config.udp_driver.yml -r /udp_read:=/converter/udp/in
    ros2 lifecycle set /udp_receiver_node 1
    ros2 lifecycle set /udp_receiver_node 3
  5. Receive, e.g., encoded CAMs on /converter/udp/in.
    ros2 topic echo /converter/udp/in
  6. Launch the etsi_its_conversion node.
    ros2 run etsi_its_conversion etsi_its_conversion_node --ros-args --params-file ./config.etsi_its_conversion.yml
  7. Receive, e.g., CAMs on /converter/cam/out.
    ros2 topic echo /converter/cam/out

Approach

  • The cube:evk natively supports etsi_its_msgs ROS 2 messages.
  • Launch the cube-its ROS 2 framework on the cube:evk to directly receive and send messages from ROS.

Prequisites

  • The cube:evk is connected to a host computer and IP addresses of both devices are known.

On the cube:evk

  1. Launch the cube-its ROS 2 framework.
    start-its --remote

On the host computer

  1. Install the etsi_its_msgs ROS packages.
    sudo apt install \
        ros-$ROS_DISTRO-etsi-its-msgs
  2. Configure the ROS 2 domain to receive ROS messages remotely from the cube:evk.
    export ROS_DOMAIN_ID=42
    export ROS_LOCALHOST_ONLY=0
  3. Receive, e.g., CAMs on /its/cam_received.
    ros2 topic echo /its/cam_received
  4. Send, e.g., CAMs by publishing to /its/cam_provided
    ros2 topic pub /its/cam_provided etsi_its_cam_msgs/msg/CAM "{}"