How to use mConfigWriter?
Current behavior I added the config writer as shown below:
void CreateMainGroup(const std::vector<std::string> & remaining_arguments)
{
finroc::structure::tTopLevelThreadContainer<> *main_thread = new finroc::structure::tTopLevelThreadContainer<>("Main Thread", __FILE__".xml", true, make_all_port_links_unique);
new finroc::reaction::gGenericGroundVehicle<finroc::reaction::examples::gHardwareInterface>(main_thread, "Test Vehicle");
main_thread->SetCycleTime(std::chrono::milliseconds(50));
auto config_writer = new finroc::reaction::mConfigWriter(main_thread);
config_writer->in_filename.Set("/sources/cpp/libraries/reaction/examples/parameter_config.xml");
}
Parameters default settings are done as follows:
mTrajectoryGenerator::mTrajectoryGenerator(core::tFrameworkElement *parent,
const std::string & name)
: tModule(parent, name, false),
par_plot_trajectories("Plot Trajectories", false, "plot_trajectories"),
I run the part and set the values.
The result is there, but all parameters are below each other e.g.:
...
<value name="acceleration_filter_factor">0.5</value>
<value name="heading_rate_target_sigma">[ 0 ]</value>
<value name="motion_vector_length_target_sigma">[ 0 ]</value>
<value name="motion_vector_angle_target_sigma">[ 0 ]</value>
<value name="orientation_mode">Gnss Support Points (2)</value>
<value name="min_support_vector_length">0.15 m</value>
<value name="min_odometry_velocity">0.25 m/s</value>
<value name="valid_support_orientation_on_stop">true</value>
<value name="orientation_sensor_sigma">[ 0.05 ]</value>
<value name="yaw_offset">0°</value>
<value name="invert_roll">false</value>
<value name="invert_pitch">false</value>
<value name="max_timestamp_difference">PT0.250S</value>
<value name="point_merge_distance">0.1 m</value>
<value name="cool_down_factor">0.1</value>
<value name="pose_label_1">result</value>
...
Expected behavior This is ok, but I want it structured as e.g. in sikola_daimler/etc/config_hardware.xml
<node name="quality_assessment">
<node name="velocity">
<value name="sensor_data_sigma">
<sigma>0.102</sigma>
</value>
</node>
<node name="curvature">
<value name="sensor_data_sigma">
<sigma>0.05</sigma>
</value>
</node>
Other information
I looked at SetConfigNode()
and SetConfigEntry()
.
But I am not sure how to use it.
Edited by Dennis Meckel