Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
[sensing_launch] Remove superfluous passthrough filter, min_z, max_z
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-apex-ai committed Dec 3, 2020
1 parent 0dda0d1 commit b2a562a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,11 @@ def generate_launch_description():
'max_x': 100.0,
'min_y': -50.0,
'max_y': 50.0,
'min_z': -2.0,
'max_z': 3.0,
'negative': False,
}
]
)

passthrough_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::PassThroughFilterComponent',
name='passthrough_filter',
remappings=[
('/input', 'top/rectified/pointcloud'),
('/output', 'concatenated/pointcloud')
],
parameters=[{
'output_frame': 'base_link',
}]
)

ground_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::RayGroundFilterComponent',
Expand Down Expand Up @@ -112,7 +97,6 @@ def generate_launch_description():
composable_node_descriptions=[
concat_component,
cropbox_component,
passthrough_component,
ground_component,
relay_component,
],
Expand Down
16 changes: 0 additions & 16 deletions sensing_launch/launch/aip_s1/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,11 @@ def generate_launch_description():
'max_x': 100.0,
'min_y': -50.0,
'max_y': 50.0,
'min_z': -2.0,
'max_z': 3.0,
'negative': False,
}
]
)

passthrough_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::PassThroughFilterComponent',
name='passthrough_filter',
remappings=[
('/input', 'top/rectified/pointcloud'),
('/output', 'concatenated/pointcloud')
],
parameters=[{
'output_frame': 'base_link',
}]
)

ground_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::RayGroundFilterComponent',
Expand Down Expand Up @@ -112,7 +97,6 @@ def generate_launch_description():
composable_node_descriptions=[
concat_component,
cropbox_component,
passthrough_component,
ground_component,
relay_component,
],
Expand Down
16 changes: 0 additions & 16 deletions sensing_launch/launch/aip_x1/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,11 @@ def generate_launch_description():
'max_x': 100.0,
'min_y': -50.0,
'max_y': 50.0,
'min_z': -2.0,
'max_z': 3.0,
'negative': False,
}
]
)

passthrough_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::PassThroughFilterComponent',
name='passthrough_filter',
remappings=[
('/input', 'top/rectified/pointcloud'),
('/output', 'concatenated/pointcloud')
],
parameters=[{
'output_frame': 'base_link',
}]
)

ground_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::RayGroundFilterComponent',
Expand Down Expand Up @@ -112,7 +97,6 @@ def generate_launch_description():
composable_node_descriptions=[
concat_component,
cropbox_component,
passthrough_component,
ground_component,
relay_component,
],
Expand Down
16 changes: 0 additions & 16 deletions sensing_launch/launch/aip_x2/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,11 @@ def generate_launch_description():
'max_x': 100.0,
'min_y': -50.0,
'max_y': 50.0,
'min_z': -2.0,
'max_z': 3.0,
'negative': False,
}
]
)

passthrough_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::PassThroughFilterComponent',
name='passthrough_filter',
remappings=[
('/input', 'top/rectified/pointcloud'),
('/output', 'concatenated/pointcloud')
],
parameters=[{
'output_frame': 'base_link',
}]
)

ground_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::RayGroundFilterComponent',
Expand Down Expand Up @@ -112,7 +97,6 @@ def generate_launch_description():
composable_node_descriptions=[
concat_component,
cropbox_component,
passthrough_component,
ground_component,
relay_component,
],
Expand Down
16 changes: 0 additions & 16 deletions sensing_launch/launch/aip_xx2/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,11 @@ def generate_launch_description():
'max_x': 100.0,
'min_y': -50.0,
'max_y': 50.0,
'min_z': -2.0,
'max_z': 3.0,
'negative': False,
}
]
)

passthrough_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::PassThroughFilterComponent',
name='passthrough_filter',
remappings=[
('/input', 'top/rectified/pointcloud'),
('/output', 'concatenated/pointcloud')
],
parameters=[{
'output_frame': 'base_link',
}]
)

ground_component = ComposableNode(
package=pkg,
plugin='pointcloud_preprocessor::RayGroundFilterComponent',
Expand Down Expand Up @@ -112,7 +97,6 @@ def generate_launch_description():
composable_node_descriptions=[
concat_component,
cropbox_component,
passthrough_component,
ground_component,
relay_component,
],
Expand Down
19 changes: 11 additions & 8 deletions sensing_launch/launch/velodyne_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
from launch_ros.descriptions import ComposableNode
import uuid


def acceptable_unique_name(prefix):
id = str(uuid.uuid4())
# ros2 apparently doesn't accept the UUID with hyphens in node names
return prefix + id.replace('-', '_')


def generate_launch_description():
launch_arguments = []

Expand Down Expand Up @@ -128,26 +135,22 @@ def create_parameter_dict(*args):

# set container to run all required components in the same process
container = ComposableNodeContainer(
name=LaunchConfiguration('container_name'),
# need unique name, otherwise all processes in same container and the node names then clash
name=acceptable_unique_name('velodyne_node_container'),
namespace='pointcloud_preprocessor',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=nodes,
)

def acceptable_unique_name(prefix='velodyne-driver-node'):
id = str(uuid.uuid4())
# ros2 doesn't accept hyphens in node names
return prefix + id.replace('-', '_')

driver_component = ComposableNode(
package='velodyne_driver',
plugin='velodyne_driver::VelodyneDriver',
# node is created in a global context, need to avoid name clash
name=acceptable_unique_name(),
name='velodyne_driver',
parameters=[create_parameter_dict('device_ip', 'frame_id', 'model', 'pcap', 'port',
'read_fast', 'read_once', 'repeat_delay', 'rpm')],
)
)

# one way to add a ComposableNode conditional on a launch argument to a
# container. The `ComposableNode` itself doesn't accept a condition
Expand Down

0 comments on commit b2a562a

Please sign in to comment.