Merge pull request #23 from tlab-wide/feature/config_file

Add config file
This commit is contained in:
Yu Asabe 2022-11-27 13:27:42 +09:00 committed by GitHub
commit 44a7907399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -59,4 +59,5 @@ endif()
ament_auto_package(INSTALL_TO_SHARE
launch
config
)

View File

@ -0,0 +1,4 @@
/**:
ros__parameters:
network_interface: "wlp4s0"
is_sender: true

View File

@ -2,7 +2,6 @@
<arg name="network_interface" default="wlp5s0"/>
<arg name="is_sender" default="true"/>
<node pkg="autoware_v2x" exec="autoware_v2x_node" namespace="v2x" output="screen">
<param name="network_interface" value="$(var network_interface)"/>
<param name="is_sender" value="$(var is_sender)"/>
<param from="$(find-pkg-share autoware_v2x)/config/autoware_v2x.param.yaml"/>
</node>
</launch>

View File

@ -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);