From: Erik Andresen Date: Sat, 20 Feb 2016 15:53:32 +0000 (+0100) Subject: moved cfg-files to config X-Git-Url: https://defiant.homedns.org/gitweb/?p=ros_wild_thumper.git;a=commitdiff_plain;h=2fa12e4c1e20c530f143c05c55dedf71a28c0a0f moved cfg-files to config --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e21cc7..fe6d50a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ generate_messages( ) generate_dynamic_reconfigure_options( - cfg/path_following.cfg + config/path_following.cfg ) ################################### diff --git a/cfg/analyzers.yaml b/cfg/analyzers.yaml deleted file mode 100644 index 76d0bc0..0000000 --- a/cfg/analyzers.yaml +++ /dev/null @@ -1,20 +0,0 @@ -analyzers: - motors: - type: diagnostic_aggregator/GenericAnalyzer - path: Motors - startswith: 'Motor' - find_and_remove_prefix: motor - reset: - type: diagnostic_aggregator/GenericAnalyzer - path: Reset - startswith: 'Reset' - timeout: -1 - voltage: - type: diagnostic_aggregator/GenericAnalyzer - path: Voltage - startswith: 'Voltage' - Razor9DofImu: - type: diagnostic_aggregator/GenericAnalyzer - path: 'Imu' - timeout: 5.0 - contains: ['Razor_Imu'] diff --git a/cfg/cmd_vel_mux.yaml b/cfg/cmd_vel_mux.yaml deleted file mode 100644 index 6ed42cb..0000000 --- a/cfg/cmd_vel_mux.yaml +++ /dev/null @@ -1,16 +0,0 @@ -subscribers: - - name: "Default input" - topic: "/cmd_vel" - timeout: 0.1 - priority: 0 - short_desc: "The default cmd_vel, controllers unaware that we are multiplexing cmd_vel should come here" - - name: "Navigation stack" - topic: "/move_base/cmd_vel" - timeout: 0.5 - priority: 1 - short_desc: "Navigation stack controller" - - name: "Wii Teleop" - topic: "/turtlebot_teleop_joystick/cmd_vel" - timeout: 0.1 - priority: 10 -publisher: "/cmd_vel_out" diff --git a/cfg/path_following.cfg b/cfg/path_following.cfg deleted file mode 100755 index 901b0bf..0000000 --- a/cfg/path_following.cfg +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -from dynamic_reconfigure.parameter_generator_catkin import * - -gen = ParameterGenerator() - -gen.add("binary_threshold", int_t, 0, "Binary Threshold", 192, 0, 255) -gen.add("ht_min_points", int_t, 0, "HT Min Points", 30, 0, 1000) -gen.add("roi_y", int_t, 0, "ROI Y (cm)", 70, 0, 1000) -gen.add("road_distance_cm", double_t, 0, "Road distance (cm)", 15, 0, 1000) -gen.add("lad_cm", double_t, 0, "Look ahead distance (cm)", 60, 0, 1000) -gen.add("speed_m_s", double_t, 0, "Speed m/s", 0, 0, 1) - -exit(gen.generate("wild_thumper", "path_following", "PathFollowing")) diff --git a/cfg/razor.yaml b/cfg/razor.yaml deleted file mode 100644 index 228ff74..0000000 --- a/cfg/razor.yaml +++ /dev/null @@ -1,36 +0,0 @@ -## USB port -port: /dev/ttyUSB0 - - -##### Calibration #### -### accelerometer -accel_x_min: -275 -accel_x_max: 290 -accel_y_min: -295 -accel_y_max: 275 -accel_z_min: -295 -accel_z_max: 215 - -### magnetometer -# standard calibration -magn_x_min: -470 -magn_x_max: 542 -magn_y_min: -767 -magn_y_max: 523 -magn_z_min: -417 -magn_z_max: 596 - - -# extended calibration -calibration_magn_use_extended: true -magn_ellipsoid_center: [293.553, 46.4419, -692.900] -magn_ellipsoid_transform: [[0.939516, 0.0193393, 0.0340815], [0.0193393, 0.957723, 0.0120572], [0.0340815, 0.0120572, 0.966198]] - - -# AHRS to robot calibration -imu_yaw_calibration: 0.0 - -### gyroscope -gyro_average_offset_x: -29.0 -gyro_average_offset_y: -21.0 -gyro_average_offset_z: 4.0 diff --git a/cfg/transformation_matrix.yml b/cfg/transformation_matrix.yml deleted file mode 100644 index 17e9ee5..0000000 --- a/cfg/transformation_matrix.yml +++ /dev/null @@ -1,6 +0,0 @@ -%YAML:1.0 -transformation_matrix: !!opencv-matrix - rows: 3 - cols: 3 - dt: d - data: [ 1.27755347e-02, 7.48846231e-02, -2.97173802e-01, -2.46883581e-03, 1.59522560e-01, -5.47704021e-01, -5.19536325e-06, 2.98962964e-04, 1.52353391e-02] diff --git a/config/analyzers.yaml b/config/analyzers.yaml new file mode 100644 index 0000000..76d0bc0 --- /dev/null +++ b/config/analyzers.yaml @@ -0,0 +1,20 @@ +analyzers: + motors: + type: diagnostic_aggregator/GenericAnalyzer + path: Motors + startswith: 'Motor' + find_and_remove_prefix: motor + reset: + type: diagnostic_aggregator/GenericAnalyzer + path: Reset + startswith: 'Reset' + timeout: -1 + voltage: + type: diagnostic_aggregator/GenericAnalyzer + path: Voltage + startswith: 'Voltage' + Razor9DofImu: + type: diagnostic_aggregator/GenericAnalyzer + path: 'Imu' + timeout: 5.0 + contains: ['Razor_Imu'] diff --git a/config/cmd_vel_mux.yaml b/config/cmd_vel_mux.yaml new file mode 100644 index 0000000..6ed42cb --- /dev/null +++ b/config/cmd_vel_mux.yaml @@ -0,0 +1,16 @@ +subscribers: + - name: "Default input" + topic: "/cmd_vel" + timeout: 0.1 + priority: 0 + short_desc: "The default cmd_vel, controllers unaware that we are multiplexing cmd_vel should come here" + - name: "Navigation stack" + topic: "/move_base/cmd_vel" + timeout: 0.5 + priority: 1 + short_desc: "Navigation stack controller" + - name: "Wii Teleop" + topic: "/turtlebot_teleop_joystick/cmd_vel" + timeout: 0.1 + priority: 10 +publisher: "/cmd_vel_out" diff --git a/config/path_following.cfg b/config/path_following.cfg new file mode 100755 index 0000000..901b0bf --- /dev/null +++ b/config/path_following.cfg @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +from dynamic_reconfigure.parameter_generator_catkin import * + +gen = ParameterGenerator() + +gen.add("binary_threshold", int_t, 0, "Binary Threshold", 192, 0, 255) +gen.add("ht_min_points", int_t, 0, "HT Min Points", 30, 0, 1000) +gen.add("roi_y", int_t, 0, "ROI Y (cm)", 70, 0, 1000) +gen.add("road_distance_cm", double_t, 0, "Road distance (cm)", 15, 0, 1000) +gen.add("lad_cm", double_t, 0, "Look ahead distance (cm)", 60, 0, 1000) +gen.add("speed_m_s", double_t, 0, "Speed m/s", 0, 0, 1) + +exit(gen.generate("wild_thumper", "path_following", "PathFollowing")) diff --git a/config/razor.yaml b/config/razor.yaml new file mode 100644 index 0000000..5b48693 --- /dev/null +++ b/config/razor.yaml @@ -0,0 +1,35 @@ +## USB port +port: /dev/ttyUSB0 + + +##### Calibration #### +### accelerometer +accel_x_min: -275 +accel_x_max: 290 +accel_y_min: -295 +accel_y_max: 275 +accel_z_min: -295 +accel_z_max: 215 + +### magnetometer +# standard calibration +magn_x_min: -470 +magn_x_max: 542 +magn_y_min: -767 +magn_y_max: 523 +magn_z_min: -417 +magn_z_max: 596 + + +# extended calibration +calibration_magn_use_extended: true +magn_ellipsoid_center: [250.567, 49.8387, -698.641] +magn_ellipsoid_transform: [[0.940458, 0.0129812, 0.0164252], [0.0129812, 0.947417, 0.0255152], [0.0164252, 0.0255152, 0.978453]] + +# AHRS to robot calibration +imu_yaw_calibration: 0.0 + +### gyroscope +gyro_average_offset_x: -29.0 +gyro_average_offset_y: -21.0 +gyro_average_offset_z: 4.0 diff --git a/config/transformation_matrix.yml b/config/transformation_matrix.yml new file mode 100644 index 0000000..17e9ee5 --- /dev/null +++ b/config/transformation_matrix.yml @@ -0,0 +1,6 @@ +%YAML:1.0 +transformation_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 1.27755347e-02, 7.48846231e-02, -2.97173802e-01, -2.46883581e-03, 1.59522560e-01, -5.47704021e-01, -5.19536325e-06, 2.98962964e-04, 1.52353391e-02] diff --git a/launch/wild_thumper.launch b/launch/wild_thumper.launch index 13b8f13..61d2511 100644 --- a/launch/wild_thumper.launch +++ b/launch/wild_thumper.launch @@ -12,7 +12,7 @@ - + @@ -21,7 +21,7 @@ - + @@ -46,7 +46,7 @@ - + diff --git a/src/path_following.cpp b/src/path_following.cpp index 7bbd7ef..a183484 100644 --- a/src/path_following.cpp +++ b/src/path_following.cpp @@ -43,7 +43,7 @@ class PathFollower PathFollower() : it(nh) { ros::NodeHandle pnh("~"); - FileStorage fs(ros::package::getPath("wild_thumper") + "/cfg/transformation_matrix.yml", FileStorage::READ); + FileStorage fs(ros::package::getPath("wild_thumper") + "/config/transformation_matrix.yml", FileStorage::READ); dynamic_reconfigure::Server::CallbackType f; fs["transformation_matrix"] >> transformation_matrix;