diff --git a/CMakeLists.txt b/CMakeLists.txt index f80c7f4..646cb6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,4 +59,5 @@ endif() ament_auto_package(INSTALL_TO_SHARE launch + config ) \ No newline at end of file diff --git a/config/autoware_v2x.param.yaml b/config/autoware_v2x.param.yaml new file mode 100644 index 0000000..5b1bce5 --- /dev/null +++ b/config/autoware_v2x.param.yaml @@ -0,0 +1,4 @@ +/**: + ros__parameters: + network_interface: "wlp4s0" + is_sender: true \ No newline at end of file diff --git a/launch/v2x.launch.xml b/launch/v2x.launch.xml index 30124ae..3e20eb1 100644 --- a/launch/v2x.launch.xml +++ b/launch/v2x.launch.xml @@ -2,7 +2,6 @@ - - + \ No newline at end of file diff --git a/src/v2x_app.cpp b/src/v2x_app.cpp index c687bc7..18aa60d 100644 --- a/src/v2x_app.cpp +++ b/src/v2x_app.cpp @@ -113,6 +113,7 @@ namespace v2x sout << mac_address; RCLCPP_INFO(node_->get_logger(), "MAC Address: '%s'", sout.str().c_str()); + // Geonetworking Management Infirmation Base (MIB) defines the GN protocol constants. gn::MIB mib; mib.itsGnLocalGnAddr.mid(mac_address); mib.itsGnLocalGnAddr.is_manually_configured(true); @@ -120,6 +121,7 @@ namespace v2x mib.itsGnSecurity = false; mib.itsGnProtocolVersion = 1; + // Create raw socket on device and LinkLayer object auto link_layer = create_link_layer(io_service, device, "ethernet"); auto positioning = create_position_provider(io_service, trigger.runtime()); auto security = create_security_entity(trigger.runtime(), *positioning);