diff --git a/ira_laser_tools b/ira_laser_tools index 586f33f..be6b628 160000 --- a/ira_laser_tools +++ b/ira_laser_tools @@ -1 +1 @@ -Subproject commit 586f33f8cf26925909d71a414ddd7d4b6767ba45 +Subproject commit be6b628c56ca8bbe093917947b759244d0e82260 diff --git a/timda_bringup/launch/robot_sim.launch b/timda_bringup/launch/robot_mapping_sim.launch similarity index 70% rename from timda_bringup/launch/robot_sim.launch rename to timda_bringup/launch/robot_mapping_sim.launch index dbbbc11..de338d7 100644 --- a/timda_bringup/launch/robot_sim.launch +++ b/timda_bringup/launch/robot_mapping_sim.launch @@ -2,6 +2,11 @@ - + + + + + + diff --git a/timda_bringup/launch/robot_nav_sim.launch b/timda_bringup/launch/robot_nav_sim.launch new file mode 100644 index 0000000..82b12cc --- /dev/null +++ b/timda_bringup/launch/robot_nav_sim.launch @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/timda_configs/nav/base_local_planner_params.yaml b/timda_configs/nav/base_local_planner_params.yaml new file mode 100644 index 0000000..f6a3fea --- /dev/null +++ b/timda_configs/nav/base_local_planner_params.yaml @@ -0,0 +1,11 @@ +TrajectoryPlannerROS: + max_vel_x: 0.45 + min_vel_x: 0.1 + max_vel_theta: 1.0 + min_in_place_vel_theta: 0.4 + + acc_lim_theta: 3.2 + acc_lim_x: 2.5 + acc_lim_y: 2.5 + + holonomic_robot: true \ No newline at end of file diff --git a/timda_configs/nav/costmap_common_params.yaml b/timda_configs/nav/costmap_common_params.yaml new file mode 100644 index 0000000..aa97d59 --- /dev/null +++ b/timda_configs/nav/costmap_common_params.yaml @@ -0,0 +1,58 @@ +max_obstacle_height: 1.5 # assume something like an arm is mounted on top of the robot + +# TIMDA's shape +footprint: [[0.3745, 0.1715], [0.4395, 0.287], [0.3915, 0.333], [0.27634, 0.271], [-0.3745, 0.271], + [-0.3745, -0.1715], [-0.4395, -0.287], [-0.3915, -0.333], [-0.27634, -0.271], [0.3745, -0.271]] +#robot_radius: ir_of_robot + +map_type: voxel + +#Set the tolerance we're willing to have for tf transforms +transform_tolerance: 0.05 + +#Obstacle marking parameters +obstacle_layer: + enabled: true + max_obstacle_height: 0.6 + origin_z: 0.0 + z_resolution: 0.2 + z_voxels: 2 + unknown_threshold: 15 + mark_threshold: 0 + combination_method: 1 + track_unknown_space: true + obstacle_range: 2.5 + raytrace_range: 3.0 + publish_voxel_map: false + observation_sources: scan + scan: + sensor_frame: base_link + data_type: LaserScan + topic: scan_multi + marking: true + clearing: true + min_obstacle_height: 0.0 + max_obstacle_height: 1.5 + +#cost_scaling_factor and inflation_radius were now moved to the inflation_layer ns +inflation_layer: + enabled: true + cost_scaling_factor: 5.0 # exponential rate at which the obstacle cost drops off (default: 10) + inflation_radius: 0.525 # max. distance from an obstacle at which costs are incurred for planning paths. + +static_layer: + enabled: true + +#Inscribed and circumscribed radius +inscribed_radius: 0.171.5 +circumscribed_radius: 0.525 + +#Cost function parameters +inflation_radius: 0.525 +cost_scaling_factor: 10.0 + +# observation_sources: laser_scan_sensor # point_cloud_sensor + +# laser_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: scan_multi, marking: true, clearing: true} + +# point_cloud_sensor: {sensor_frame: frame_name, data_type: PointCloud, topic: topic_name, marking: true, clearing: true} \ No newline at end of file diff --git a/timda_configs/nav/dwa_local_planner_params.yaml b/timda_configs/nav/dwa_local_planner_params.yaml new file mode 100644 index 0000000..367a3e0 --- /dev/null +++ b/timda_configs/nav/dwa_local_planner_params.yaml @@ -0,0 +1,56 @@ +DWAPlannerROS: + +# Robot Configuration Parameters - Kobuki + max_vel_x: 0.5 # 0.55 + min_vel_x: 0.0 + + max_vel_y: 0.0 # diff drive robot + min_vel_y: 0.0 # diff drive robot + + max_trans_vel: 0.5 # choose slightly less than the base's capability + min_trans_vel: 0.1 # this is the min trans velocity when there is negligible rotational velocity + trans_stopped_vel: 0.1 + + # Warning! + # do not set min_trans_vel to 0.0 otherwise dwa will always think translational velocities + # are non-negligible and small in place rotational velocities will be created. + + max_rot_vel: 5.0 # choose slightly less than the base's capability + min_rot_vel: 0.4 # this is the min angular velocity when there is negligible translational velocity + rot_stopped_vel: 0.4 + + acc_lim_x: 1.0 # maximum is theoretically 2.0, but we + acc_lim_theta: 2.0 + acc_lim_y: 0.0 # diff drive robot + +# Goal Tolerance Parameters + yaw_goal_tolerance: 0.3 # 0.05 + xy_goal_tolerance: 0.15 # 0.10 + # latch_xy_goal_tolerance: false + +# Forward Simulation Parameters + sim_time: 1.0 # 1.7 + vx_samples: 6 # 3 + vy_samples: 1 # diff drive robot, there is only one sample + vtheta_samples: 20 # 20 + +# Trajectory Scoring Parameters + path_distance_bias: 64.0 # 32.0 - weighting for how much it should stick to the global path plan + goal_distance_bias: 24.0 # 24.0 - wighting for how much it should attempt to reach its goal + occdist_scale: 0.5 # 0.01 - weighting for how much the controller should avoid obstacles + forward_point_distance: 0.325 # 0.325 - how far along to place an additional scoring point + stop_time_buffer: 0.2 # 0.2 - amount of time a robot must stop in before colliding for a valid traj. + scaling_speed: 0.25 # 0.25 - absolute velocity at which to start scaling the robot's footprint + max_scaling_factor: 0.2 # 0.2 - how much to scale the robot's footprint when at speed. + +# Oscillation Prevention Parameters + oscillation_reset_dist: 0.05 # 0.05 - how far to travel before resetting oscillation flags + +# Debugging + publish_traj_pc : true + publish_cost_grid_pc: true + global_frame_id: odom + + +# Differential-drive robot configuration - necessary? +# holonomic_robot: false \ No newline at end of file diff --git a/timda_configs/nav/global_costmap_params.yaml b/timda_configs/nav/global_costmap_params.yaml new file mode 100644 index 0000000..b714013 --- /dev/null +++ b/timda_configs/nav/global_costmap_params.yaml @@ -0,0 +1,12 @@ +global_costmap: + global_frame: map + robot_base_frame: base_footprint + update_frequency: 1.0 + publish_frequency: 0.5 + static_map: true + transform_tolerance: 0.05 + # + plugins: + - {name: static_layer, type: "costmap_2d::StaticLayer"} + - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} + - {name: inflation_layer, type: "costmap_2d::InflationLayer"} \ No newline at end of file diff --git a/timda_configs/nav/global_planner_params.yaml b/timda_configs/nav/global_planner_params.yaml new file mode 100644 index 0000000..8f15c03 --- /dev/null +++ b/timda_configs/nav/global_planner_params.yaml @@ -0,0 +1,20 @@ + +GlobalPlanner: # Also see: http://wiki.ros.org/global_planner + old_navfn_behavior: false # Exactly mirror behavior of navfn, use defaults for other boolean parameters, default false + use_quadratic: true # Use the quadratic approximation of the potential. Otherwise, use a simpler calculation, default true + use_dijkstra: true # Use dijkstra's algorithm. Otherwise, A*, default true + use_grid_path: false # Create a path that follows the grid boundaries. Otherwise, use a gradient descent method, default false + + allow_unknown: true # Allow planner to plan through unknown space, default true + #Needs to have track_unknown_space: true in the obstacle / voxel layer (in costmap_commons_param) to work + planner_window_x: 0.0 # default 0.0 + planner_window_y: 0.0 # default 0.0 + default_tolerance: 0.0 # If goal in obstacle, plan to the closest point in radius default_tolerance, default 0.0 + + publish_scale: 100 # Scale by which the published potential gets multiplied, default 100 + planner_costmap_publish_frequency: 0.0 # default 0.0 + + lethal_cost: 253 # default 253 + neutral_cost: 50 # default 50 + cost_factor: 3.0 # Factor to multiply each cost from costmap by, default 3.0 + publish_potential: true # Publish Potential Costmap (this is not like the navfn pointcloud2 potential), default true \ No newline at end of file diff --git a/timda_configs/nav/local_costmap_params.yaml b/timda_configs/nav/local_costmap_params.yaml new file mode 100644 index 0000000..4cc8840 --- /dev/null +++ b/timda_configs/nav/local_costmap_params.yaml @@ -0,0 +1,14 @@ +local_costmap: + global_frame: odom + robot_base_frame: base_footprint + update_frequency: 5.0 + publish_frequency: 2.0 + static_map: false + rolling_window: true + width: 4.0 + height: 4.0 + resolution: 0.05 + transform_tolerance: 0.3 + plugins: + - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} + - {name: inflation_layer, type: "costmap_2d::InflationLayer"} \ No newline at end of file diff --git a/timda_configs/nav/move_base_params.yaml b/timda_configs/nav/move_base_params.yaml new file mode 100644 index 0000000..d387062 --- /dev/null +++ b/timda_configs/nav/move_base_params.yaml @@ -0,0 +1,17 @@ +shutdown_costmaps: false + +controller_frequency: 5.0 +controller_patience: 3.0 + + +planner_frequency: 1.0 +planner_patience: 5.0 + +oscillation_timeout: 10.0 +oscillation_distance: 0.2 + +# local planner - default is trajectory rollout +base_local_planner: "dwa_local_planner/DWAPlannerROS" +# +# +base_global_planner: "navfn/NavfnROS" #alternatives: global_planner/GlobalPlanner, carrot_planner/CarrotPlanner \ No newline at end of file diff --git a/timda_configs/nav/navfn_global_planner_params.yaml b/timda_configs/nav/navfn_global_planner_params.yaml new file mode 100644 index 0000000..a0b6bea --- /dev/null +++ b/timda_configs/nav/navfn_global_planner_params.yaml @@ -0,0 +1,10 @@ + +NavfnROS: + visualize_potential: false #Publish potential for rviz as pointcloud2, not really helpful, default false + allow_unknown: false #Specifies whether or not to allow navfn to create plans that traverse unknown space, default true + #Needs to have track_unknown_space: true in the obstacle / voxel layer (in costmap_commons_param) to work + planner_window_x: 0.0 #Specifies the x size of an optional window to restrict the planner to, default 0.0 + planner_window_y: 0.0 #Specifies the y size of an optional window to restrict the planner to, default 0.0 + + default_tolerance: 0.0 #If the goal is in an obstacle, the planer will plan to the nearest point in the radius of default_tolerance, default 0.0 + #The area is always searched, so could be slow for big values diff --git a/timda_configs/rviz/nav.rviz b/timda_configs/rviz/nav.rviz new file mode 100644 index 0000000..8714388 --- /dev/null +++ b/timda_configs/rviz/nav.rviz @@ -0,0 +1,386 @@ +Panels: + - Class: rviz/Displays + Help Height: 78 + Name: Displays + Property Tree Widget: + Expanded: + - /RobotModel1 + - /Local Path1/Offset1 + Splitter Ratio: 0.5323383212089539 + Tree Height: 728 + - Class: rviz/Selection + Name: Selection + - Class: rviz/Tool Properties + Expanded: + - /2D Pose Estimate1 + - /2D Nav Goal1 + - /Publish Point1 + Name: Tool Properties + Splitter Ratio: 0.5886790156364441 + - Class: rviz/Views + Expanded: + - /Current View1 + Name: Views + Splitter Ratio: 0.5 + - Class: rviz/Time + Experimental: false + Name: Time + SyncMode: 0 + SyncSource: Mergerd Scan +Preferences: + PromptSaveOnExit: true +Toolbars: + toolButtonStyle: 2 +Visualization Manager: + Class: "" + Displays: + - Alpha: 0.5 + Cell Size: 1 + Class: rviz/Grid + Color: 160; 160; 164 + Enabled: true + Line Style: + Line Width: 0.029999999329447746 + Value: Lines + Name: Grid + Normal Cell Count: 0 + Offset: + X: 0 + Y: 0 + Z: 0 + Plane: XY + Plane Cell Count: 10 + Reference Frame: + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: false + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/LaserScan + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: false + Invert Rainbow: false + Max Color: 138; 226; 52 + Max Intensity: 0 + Min Color: 78; 154; 6 + Min Intensity: 0 + Name: Front Scan + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.009999999776482582 + Style: Flat Squares + Topic: /laser_front + Unreliable: false + Use Fixed Frame: true + Use rainbow: false + Value: false + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/LaserScan + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: false + Invert Rainbow: true + Max Color: 114; 159; 207 + Max Intensity: 0 + Min Color: 32; 74; 135 + Min Intensity: 0 + Name: Back Scan + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.009999999776482582 + Style: Flat Squares + Topic: /laser_back + Unreliable: false + Use Fixed Frame: true + Use rainbow: false + Value: false + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/LaserScan + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: false + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: Mergerd Scan + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.009999999776482582 + Style: Flat Squares + Topic: /scan_multi + Unreliable: false + Use Fixed Frame: true + Use rainbow: true + Value: false + - Alpha: 1 + Class: rviz/RobotModel + Collision Enabled: false + Enabled: true + Links: + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order + back_lidar_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + base_footprint: + Alpha: 1 + Show Axes: false + Show Trail: false + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + front_lidar_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Name: RobotModel + Robot Description: robot_description + TF Prefix: "" + Update Interval: 0 + Value: true + Visual Enabled: true + - Alpha: 0.699999988079071 + Class: rviz/Map + Color Scheme: map + Draw Behind: false + Enabled: true + Name: Map + Topic: /map + Unreliable: false + Use Timestamp: false + Value: true + - Alpha: 1 + Axes Length: 1 + Axes Radius: 0.10000000149011612 + Class: rviz/Pose + Color: 255; 25; 0 + Enabled: true + Head Length: 0.30000001192092896 + Head Radius: 0.10000000149011612 + Name: Pose + Shaft Length: 1 + Shaft Radius: 0.05000000074505806 + Shape: Arrow + Topic: /slam_out_pose + Unreliable: false + Value: true + - Angle Tolerance: 0.10000000149011612 + Class: rviz/Odometry + Covariance: + Orientation: + Alpha: 0.5 + Color: 255; 255; 127 + Color Style: Unique + Frame: Local + Offset: 1 + Scale: 1 + Value: true + Position: + Alpha: 0.30000001192092896 + Color: 204; 51; 204 + Scale: 1 + Value: true + Value: false + Enabled: false + Keep: 100 + Name: Odometry + Position Tolerance: 0.10000000149011612 + Shape: + Alpha: 1 + Axes Length: 1 + Axes Radius: 0.10000000149011612 + Color: 255; 25; 0 + Head Length: 0.30000001192092896 + Head Radius: 0.10000000149011612 + Shaft Length: 1 + Shaft Radius: 0.05000000074505806 + Value: Arrow + Topic: /odom + Unreliable: false + Value: false + - Alpha: 1 + Arrow Length: 0.30000001192092896 + Axes Length: 0.30000001192092896 + Axes Radius: 0.009999999776482582 + Class: rviz/PoseArray + Color: 255; 25; 0 + Enabled: false + Head Length: 0.07000000029802322 + Head Radius: 0.029999999329447746 + Name: Particales + Shaft Length: 0.23000000417232513 + Shaft Radius: 0.009999999776482582 + Shape: Arrow (Flat) + Topic: /particlecloud + Unreliable: false + Value: false + - Alpha: 0.699999988079071 + Class: rviz/Map + Color Scheme: map + Draw Behind: true + Enabled: true + Name: Global CostMap + Topic: /move_base/global_costmap/costmap + Unreliable: false + Use Timestamp: false + Value: true + - Alpha: 0.699999988079071 + Class: rviz/Map + Color Scheme: map + Draw Behind: true + Enabled: true + Name: Local CostMap + Topic: /move_base/local_costmap/costmap + Unreliable: false + Use Timestamp: false + Value: true + - Alpha: 1 + Buffer Length: 1 + Class: rviz/Path + Color: 25; 255; 0 + Enabled: true + Head Diameter: 0.30000001192092896 + Head Length: 0.20000000298023224 + Length: 0.30000001192092896 + Line Style: Lines + Line Width: 0.029999999329447746 + Name: Global Path + Offset: + X: 0 + Y: 0 + Z: 0 + Pose Color: 255; 85; 255 + Pose Style: None + Radius: 0.029999999329447746 + Shaft Diameter: 0.10000000149011612 + Shaft Length: 0.10000000149011612 + Topic: /move_base/DWAPlannerROS/global_plan + Unreliable: false + Value: true + - Alpha: 1 + Buffer Length: 1 + Class: rviz/Path + Color: 52; 101; 164 + Enabled: true + Head Diameter: 0.10000000149011612 + Head Length: 0.20000000298023224 + Length: 0.30000001192092896 + Line Style: Lines + Line Width: 0.029999999329447746 + Name: Local Path + Offset: + X: 0 + Y: 0 + Z: 0.4000000059604645 + Pose Color: 255; 85; 255 + Pose Style: Arrows + Radius: 0.029999999329447746 + Shaft Diameter: 0.10000000149011612 + Shaft Length: 0.10000000149011612 + Topic: /move_base/DWAPlannerROS/local_plan + Unreliable: false + Value: true + Enabled: true + Global Options: + Background Color: 48; 48; 48 + Default Light: true + Fixed Frame: map + Frame Rate: 30 + Name: root + Tools: + - Class: rviz/Interact + Hide Inactive Objects: true + - Class: rviz/MoveCamera + - Class: rviz/Select + - Class: rviz/FocusCamera + - Class: rviz/Measure + - Class: rviz/SetInitialPose + Theta std deviation: 0.2617993950843811 + Topic: /initialpose + X std deviation: 0.5 + Y std deviation: 0.5 + - Class: rviz/SetGoal + Topic: /move_base_simple/goal + - Class: rviz/PublishPoint + Single click: true + Topic: /clicked_point + Value: true + Views: + Current: + Class: rviz/Orbit + Distance: 7.433988094329834 + Enable Stereo Rendering: + Stereo Eye Separation: 0.05999999865889549 + Stereo Focal Distance: 1 + Swap Stereo Eyes: false + Value: false + Focal Point: + X: 0.5350267887115479 + Y: -1.1870977878570557 + Z: 1.9099693298339844 + Focal Shape Fixed Size: true + Focal Shape Size: 0.05000000074505806 + Invert Z Axis: false + Name: Current View + Near Clip Distance: 0.009999999776482582 + Pitch: 0.22479912638664246 + Target Frame: + Value: Orbit (rviz) + Yaw: 4.594900131225586 + Saved: ~ +Window Geometry: + Displays: + collapsed: false + Height: 1025 + Hide Left Dock: false + Hide Right Dock: true + QMainWindow State: 000000ff00000000fd00000004000000000000019400000363fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000363000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f00000363fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d00000363000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000073d0000003efc0100000002fb0000000800540069006d006501000000000000073d000002eb00fffffffb0000000800540069006d00650100000000000004500000000000000000000005a30000036300000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Selection: + collapsed: false + Time: + collapsed: false + Tool Properties: + collapsed: false + Views: + collapsed: true + Width: 1853 + X: 67 + Y: 283 diff --git a/timda_sim b/timda_sim index cc171b2..f34d823 160000 --- a/timda_sim +++ b/timda_sim @@ -1 +1 @@ -Subproject commit cc171b2b3f3c01d615bd8f89eb00d353d9e03110 +Subproject commit f34d8239cc0f8b123e2098e92801cfff90f8a75b