From 04589353828da4ba49dde4dd3e1efd61f9c2cca7 Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Tue, 16 Jul 2019 21:08:35 +0200 Subject: [PATCH] urdf: Add gazebo laser configuration --- CMakeLists.txt | 5 ++++- config/costmap_exploration.yaml | 2 +- config/global_costmap_params.yaml | 2 +- config/robot_localization.yaml | 2 +- data/power_consumption.txt | 12 ++++++++++++ package.xml | 2 ++ scripts/pocketsphinx.rb | 14 ++++++++------ urdf/wild_thumper.urdf.xacro | 32 +++++++++++++++++++++++++++++++ 8 files changed, 61 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c83bb86..689434c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(wild_thumper) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages -find_package(catkin REQUIRED sensor_msgs cv_bridge roscpp rospy std_msgs image_transport dynamic_reconfigure message_generation) +find_package(catkin REQUIRED sensor_msgs cv_bridge roscpp rospy std_msgs image_transport dynamic_reconfigure message_generation rosruby) find_package(OpenCV) ## System dependencies are found with CMake's conventions @@ -67,6 +67,9 @@ generate_messages( std_msgs # Or other packages containing msgs ) +rosruby_setup() +rosruby_generate_messages(fiducial_msgs) + generate_dynamic_reconfigure_options( config/path_following.cfg config/wt_node.cfg diff --git a/config/costmap_exploration.yaml b/config/costmap_exploration.yaml index 84c88ef..4ce6692 100644 --- a/config/costmap_exploration.yaml +++ b/config/costmap_exploration.yaml @@ -18,7 +18,7 @@ plugins: static_layer: # Can pull data from gmapping, map_server or a non-rolling costmap - map_topic: /map + map_topic: map # map_topic: move_base/global_costmap/costmap subscribe_to_updates: true diff --git a/config/global_costmap_params.yaml b/config/global_costmap_params.yaml index 04e296d..af07509 100644 --- a/config/global_costmap_params.yaml +++ b/config/global_costmap_params.yaml @@ -1,5 +1,5 @@ global_costmap: - global_frame: /map + global_frame: map robot_base_frame: base_footprint static_map: true publish_frequency: 1.0 diff --git a/config/robot_localization.yaml b/config/robot_localization.yaml index 82d5fff..bce9d74 100644 --- a/config/robot_localization.yaml +++ b/config/robot_localization.yaml @@ -120,7 +120,7 @@ imu0_remove_gravitational_acceleration: true # if the node is unhappy with any settings or data. print_diagnostics: true -# If true, will dynamically scale the process_noise_covariance based on the robot?s velocity. This is useful, e.g., when you want your +# If true, will dynamically scale the process_noise_covariance based on the robot's velocity. This is useful, e.g., when you want your # robots estimate error covariance to stop growing when the robot is stationary. Defaults to false. dynamic_process_noise_covariance: true diff --git a/data/power_consumption.txt b/data/power_consumption.txt index 17e663f..99cdc50 100644 --- a/data/power_consumption.txt +++ b/data/power_consumption.txt @@ -21,3 +21,15 @@ Hummingboard Idle (no Openni2): 0.65A Hummingboard Nav: 0.8A RPI3 Idle (no Openni2): 0.58A RPI3 Nav: 0.71A + +Sensor: +---------- +Kein Sensor: 0.34A +Idle Xtion: 0.67A (+0.16A) +Run Xtion: 0.74A (+0.29A) + +Idle rplidar2: 0.66A (+0.26A) +Run rplidar2: 0.93A (+0.60A) + +Idle rplidar1: +0.05A +Run rplidar1: +0.25A diff --git a/package.xml b/package.xml index 69fe021..0c68507 100644 --- a/package.xml +++ b/package.xml @@ -54,6 +54,8 @@ depthimage_to_laserscan message_runtime rosruby + amcl + gmapping diff --git a/scripts/pocketsphinx.rb b/scripts/pocketsphinx.rb index c2a87fb..d8e7bef 100755 --- a/scripts/pocketsphinx.rb +++ b/scripts/pocketsphinx.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -w +#!/usr/bin/ruby require 'gst' require 'pry' @@ -40,8 +40,10 @@ class Speak binding.pry # open console loop.quit when Gst::MessageType::ELEMENT - if message.src.name == "asr_kws" and message.structure.get_value(:final).value - keyword_detect(message.structure.get_value(:hypothesis).value, message.structure.get_value(:confidence).value) + if message.src.name == "asr_kws" + if message.structure.get_value(:final).value + keyword_detect(message.structure.get_value(:hypothesis).value, message.structure.get_value(:confidence).value) + end elsif message.src.name == "asr_jsgf" if message.structure.get_value(:final).value final_result(message.structure.get_value(:hypothesis).value, message.structure.get_value(:confidence).value) @@ -60,13 +62,13 @@ class Speak @pipeline.play end - # Enables/Disables the jsgf pipeline + # Enables/Disables the jsgf pipeline branch def enable_jsgf(bEnable) valve = @pipeline.get_by_name('valve_jsgf') valve.set_property("drop", !bEnable) end - # Result of jsgf pipeline + # Result of jsgf pipeline branch def final_result(hyp, confidence) @logger.info "final: " + hyp + " " + confidence.to_s enable_jsgf(false) @@ -88,7 +90,7 @@ class Speak end if __FILE__ == $0 - node = ROS::Node.new('wild_thumper/pocketsphinx') + node = ROS::Node.new('pocketsphinx') app = Speak.new(node) loop = GLib::MainLoop.new(nil, false) begin diff --git a/urdf/wild_thumper.urdf.xacro b/urdf/wild_thumper.urdf.xacro index 5d5f9b7..2f00fd6 100644 --- a/urdf/wild_thumper.urdf.xacro +++ b/urdf/wild_thumper.urdf.xacro @@ -256,4 +256,36 @@ + + + + 0 0 0 0 0 0 + false + 12 + + + + 360 + 1 + -3.12413907051 + 3.14159274101 + + + + 0.15 + 16.0 + 0.01 + + + gaussian + 0.0 + 0.01 + + + + /scan + lidar + + + -- 2.39.5