-
Notifications
You must be signed in to change notification settings - Fork 639
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: support vls128 for ros2 (#493) * Update rolling ci (#512) Fix Rolling CI and associated linter errors. * Add support for the velodyne Alpha Prime (#370) * Add support for the velodyne Alpha Prime * Change packet rate for the VLS128 according to the times specified in the manual * Organize setup functions to avoid code duplication. Add a constant for the model ID of the VLS128. * Use the defined constants to calculate the time offset of the points for the VLS128 Co-authored-by: jugo <juan.gonzalez@unibw.de> * Add VLS128 launch and calibration file (#382) Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * vls128: add line only once all four banks are processed (#413) Signed-off-by: Sebastian Scherer (CR/AAS3) <sebastian.scherer2@de.bosch.com> Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * fix: apply uncrustify Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Fixing incorrect type in velodyne_pointcloud. * Fixed non working vls128 fork * Added organized cloud compliance and remove some useless code * Corrected the azimuth offset calculation and put the declation of variable where there are used * Fix linter errors. --------- Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> Signed-off-by: Sebastian Scherer (CR/AAS3) <sebastian.scherer2@de.bosch.com> Co-authored-by: Joshua Whitley <josh@electrifiedautonomy.com> Co-authored-by: Institute for Autonomous Systems Technology <tas@unibw.de> Co-authored-by: jugo <juan.gonzalez@unibw.de> Co-authored-by: Sebastian Scherer <sebastian.scherer2@de.bosch.com> Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp> Co-authored-by: Joshua Whitley <josh.whitley@autoware.org> Co-authored-by: Mtestor <mucevval@gmail.com> * Fix double include --------- Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> Signed-off-by: Sebastian Scherer (CR/AAS3) <sebastian.scherer2@de.bosch.com> Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Co-authored-by: Institute for Autonomous Systems Technology <tas@unibw.de> Co-authored-by: jugo <juan.gonzalez@unibw.de> Co-authored-by: Sebastian Scherer <sebastian.scherer2@de.bosch.com> Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp> Co-authored-by: Joshua Whitley <josh.whitley@autoware.org> Co-authored-by: Mtestor <mucevval@gmail.com>
- Loading branch information
1 parent
8e65c00
commit d8cf623
Showing
13 changed files
with
1,103 additions
and
11 deletions.
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
velodyne/launch/velodyne-all-nodes-VLS128-composed-launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer in the documentation and/or other materials provided | ||
# with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
"""Launch the velodyne driver, pointcloud, and laserscan nodes in a composable container with default configuration.""" | ||
|
||
import os | ||
import yaml | ||
|
||
import ament_index_python.packages | ||
from launch import LaunchDescription | ||
from launch_ros.actions import ComposableNodeContainer | ||
from launch_ros.descriptions import ComposableNode | ||
|
||
|
||
def generate_launch_description(): | ||
driver_share_dir = ament_index_python.packages.get_package_share_directory('velodyne_driver') | ||
driver_params_file = os.path.join(driver_share_dir, 'config', 'VLS128-velodyne_driver_node-params.yaml') | ||
with open(driver_params_file, 'r') as f: | ||
driver_params = yaml.safe_load(f)['velodyne_driver_node']['ros__parameters'] | ||
|
||
convert_share_dir = ament_index_python.packages.get_package_share_directory('velodyne_pointcloud') | ||
convert_params_file = os.path.join(convert_share_dir, 'config', 'VLS128-velodyne_transform_node-params.yaml') | ||
with open(convert_params_file, 'r') as f: | ||
convert_params = yaml.safe_load(f)['velodyne_transform_node']['ros__parameters'] | ||
convert_params['calibration'] = os.path.join(convert_share_dir, 'params', 'VLS128.yaml') | ||
|
||
laserscan_share_dir = ament_index_python.packages.get_package_share_directory('velodyne_laserscan') | ||
laserscan_params_file = os.path.join(laserscan_share_dir, 'config', 'default-velodyne_laserscan_node-params.yaml') | ||
with open(laserscan_params_file, 'r') as f: | ||
laserscan_params = yaml.safe_load(f)['velodyne_laserscan_node']['ros__parameters'] | ||
|
||
container = ComposableNodeContainer( | ||
name='velodyne_container', | ||
namespace='', | ||
package='rclcpp_components', | ||
executable='component_container', | ||
composable_node_descriptions=[ | ||
ComposableNode( | ||
package='velodyne_driver', | ||
plugin='velodyne_driver::VelodyneDriver', | ||
name='velodyne_driver_node', | ||
parameters=[driver_params]), | ||
ComposableNode( | ||
package='velodyne_pointcloud', | ||
plugin='velodyne_pointcloud::Transform', | ||
name='velodyne_transform_node', | ||
parameters=[convert_params]), | ||
ComposableNode( | ||
package='velodyne_laserscan', | ||
plugin='velodyne_laserscan::VelodyneLaserScan', | ||
name='velodyne_laserscan_node', | ||
parameters=[laserscan_params]), | ||
], | ||
output='both', | ||
) | ||
|
||
return LaunchDescription([container]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer in the documentation and/or other materials provided | ||
# with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
"""Launch the velodyne driver, pointcloud, and laserscan nodes with default configuration.""" | ||
|
||
import os | ||
import yaml | ||
|
||
import ament_index_python.packages | ||
import launch | ||
import launch_ros.actions | ||
|
||
|
||
def generate_launch_description(): | ||
driver_share_dir = ament_index_python.packages.get_package_share_directory('velodyne_driver') | ||
driver_params_file = os.path.join(driver_share_dir, 'config', 'VLS128-velodyne_driver_node-params.yaml') | ||
velodyne_driver_node = launch_ros.actions.Node(package='velodyne_driver', | ||
executable='velodyne_driver_node', | ||
output='both', | ||
parameters=[driver_params_file]) | ||
|
||
convert_share_dir = ament_index_python.packages.get_package_share_directory('velodyne_pointcloud') | ||
convert_params_file = os.path.join(convert_share_dir, 'config', 'VLS128-velodyne_transform_node-params.yaml') | ||
with open(convert_params_file, 'r') as f: | ||
convert_params = yaml.safe_load(f)['velodyne_transform_node']['ros__parameters'] | ||
convert_params['calibration'] = os.path.join(convert_share_dir, 'params', 'VLS128.yaml') | ||
velodyne_transform_node = launch_ros.actions.Node(package='velodyne_pointcloud', | ||
executable='velodyne_transform_node', | ||
output='both', | ||
parameters=[convert_params]) | ||
|
||
laserscan_share_dir = ament_index_python.packages.get_package_share_directory('velodyne_laserscan') | ||
laserscan_params_file = os.path.join(laserscan_share_dir, 'config', 'default-velodyne_laserscan_node-params.yaml') | ||
velodyne_laserscan_node = launch_ros.actions.Node(package='velodyne_laserscan', | ||
executable='velodyne_laserscan_node', | ||
output='both', | ||
parameters=[laserscan_params_file]) | ||
|
||
|
||
return launch.LaunchDescription([velodyne_driver_node, | ||
velodyne_transform_node, | ||
velodyne_laserscan_node, | ||
|
||
launch.actions.RegisterEventHandler( | ||
event_handler=launch.event_handlers.OnProcessExit( | ||
target_action=velodyne_driver_node, | ||
on_exit=[launch.actions.EmitEvent( | ||
event=launch.events.Shutdown())], | ||
)), | ||
]) |
14 changes: 14 additions & 0 deletions
14
velodyne_driver/config/VLS128-velodyne_driver_node-params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
velodyne_driver_node: | ||
ros__parameters: | ||
device_ip: 192.168.1.201 | ||
gps_time: false | ||
time_offset: 0.0 | ||
enabled: true | ||
read_once: false | ||
read_fast: false | ||
repeat_delay: 0.0 | ||
frame_id: velodyne | ||
model: VLS128 | ||
rpm: 600.0 | ||
port: 2368 | ||
timestamp_first_packet: false |
68 changes: 68 additions & 0 deletions
68
velodyne_driver/launch/velodyne_driver_node-VLS128-composed-launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# All rights reserved. | ||
# | ||
# Software License Agreement (BSD License 2.0) | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer in the documentation and/or other materials provided | ||
# with the distribution. | ||
# * Neither the name of {copyright_holder} nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
"""Launch the velodyne driver node in a composable container with default configuration.""" | ||
|
||
import os | ||
|
||
import ament_index_python.packages | ||
|
||
from launch import LaunchDescription | ||
from launch_ros.actions import ComposableNodeContainer | ||
from launch_ros.descriptions import ComposableNode | ||
|
||
import yaml | ||
|
||
|
||
def generate_launch_description(): | ||
config_directory = os.path.join( | ||
ament_index_python.packages.get_package_share_directory('velodyne_driver'), | ||
'config') | ||
param_config = os.path.join(config_directory, 'VLS128-velodyne_driver_node-params.yaml') | ||
with open(param_config, 'r') as f: | ||
params = yaml.safe_load(f)['velodyne_driver_node']['ros__parameters'] | ||
container = ComposableNodeContainer( | ||
name='velodyne_driver_container', | ||
namespace='', | ||
package='rclcpp_components', | ||
executable='component_container', | ||
composable_node_descriptions=[ | ||
ComposableNode( | ||
package='velodyne_driver', | ||
plugin='velodyne_driver::VelodyneDriver', | ||
name='velodyne_driver_node', | ||
parameters=[params]), | ||
], | ||
output='both', | ||
) | ||
|
||
return LaunchDescription([container]) |
60 changes: 60 additions & 0 deletions
60
velodyne_driver/launch/velodyne_driver_node-VLS128-launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# All rights reserved. | ||
# | ||
# Software License Agreement (BSD License 2.0) | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer in the documentation and/or other materials provided | ||
# with the distribution. | ||
# * Neither the name of {copyright_holder} nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
"""Launch the velodyne driver node with default configuration.""" | ||
|
||
import os | ||
|
||
import ament_index_python.packages | ||
import launch | ||
import launch_ros.actions | ||
|
||
|
||
def generate_launch_description(): | ||
config_directory = os.path.join( | ||
ament_index_python.packages.get_package_share_directory('velodyne_driver'), | ||
'config') | ||
params = os.path.join(config_directory, 'VLS128-velodyne_driver_node-params.yaml') | ||
velodyne_driver_node = launch_ros.actions.Node(package='velodyne_driver', | ||
executable='velodyne_driver_node', | ||
output='both', | ||
parameters=[params]) | ||
|
||
return launch.LaunchDescription([velodyne_driver_node, | ||
|
||
launch.actions.RegisterEventHandler( | ||
event_handler=launch.event_handlers.OnProcessExit( | ||
target_action=velodyne_driver_node, | ||
on_exit=[launch.actions.EmitEvent( | ||
event=launch.events.Shutdown())], | ||
)), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
velodyne_pointcloud/config/VLS128-velodyne_transform_node-params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
velodyne_transform_node: | ||
ros__parameters: | ||
calibration: VLS128.yaml | ||
model: VLS128 | ||
min_range: 0.4 | ||
max_range: 300.0 | ||
view_direction: 0.0 | ||
fixed_frame: "" | ||
target_frame: "" | ||
organize_cloud: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.