Skip to content

Commit 066dd7a

Browse files
authored
Merge pull request #431 from PickNikRobotics/octomap-example
feat: octomap example working in lab_sim
2 parents 0aa8eb7 + 61344d6 commit 066dd7a

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

src/lab_sim/config/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ moveit_params:
3232
pose_jog:
3333
package: "lab_sim"
3434
path: "config/moveit/pose_jog.yaml"
35+
sensors_3d:
36+
package: "lab_sim"
37+
path: "config/moveit/sensors_3d.yaml"
3538

3639
# Configuration for loading behaviors and objectives.
3740
# [Required]

src/lab_sim/config/moveit/sensors_3d.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ scene_scan_camera:
77
# Set to an empty topic to disable.
88
point_cloud_service_name: "/point_cloud_service"
99
# Points further than this will not be used (in meters).
10-
max_range: 1.5
10+
max_range: 6.0
1111
# Choose one of every 'point_subsample' points (select all if set to 1).
1212
point_subsample: 1
1313
# Should always be >= 1.0. Scale up collision shapes in the scene before excluding them from the octomap.
1414
padding_scale: 1.0
1515
# Absolute padding around scaled collision shapes when excluding them from the octomap (in meters).
16-
padding_offset: 0.01
16+
padding_offset: 0.1
1717
# The octomap representation will be updated at rate less than or equal to this value.
1818
max_update_rate: 0.1
1919

2020
# Specifies the resolution at which the octomap is maintained (in meters).
21-
octomap_resolution: 0.01
21+
octomap_resolution: 0.05
2222
# Specifies the coordinate frame in which the Octomap representation will be stored.
2323
# Note! When an OccupancyMonitor instance is initialized by the PlanningSceneMonitor,
2424
# this frame parameter will not be used. Instead, the frame defaults to the planning frame.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<root BTCPP_format="4" main_tree_to_execute="Octomap Example">
3+
<!--//////////-->
4+
<BehaviorTree
5+
ID="Octomap Example"
6+
_description="Takes a snapshot of the scene camera and then updates the planning scene in RViz with an ocotomap based on the `sensors_3d.yaml` file settings."
7+
_favorite="false"
8+
>
9+
<Control ID="Sequence" name="TopLevelSequence">
10+
<Action ID="ClearSnapshot" />
11+
<Action
12+
ID="GetPointCloud"
13+
message_out="{point_cloud}"
14+
publisher_timeout_sec="5.000000"
15+
timeout_sec="5.000000"
16+
topic_name="/scene_camera/points"
17+
/>
18+
<Action
19+
ID="UpdatePlanningSceneService"
20+
point_cloud="{point_cloud}"
21+
point_cloud_service="/point_cloud_service"
22+
/>
23+
<Action
24+
ID="SendPointCloudToUI"
25+
pcd_topic="/pcd_pointcloud_captures"
26+
point_cloud="{point_cloud}"
27+
/>
28+
</Control>
29+
</BehaviorTree>
30+
<TreeNodesModel>
31+
<SubTree ID="Octomap Example">
32+
<MetadataFields>
33+
<Metadata runnable="true" />
34+
<Metadata subcategory="Perception - 3D Point Cloud" />
35+
</MetadataFields>
36+
</SubTree>
37+
</TreeNodesModel>
38+
</root>

0 commit comments

Comments
 (0)