Skip to content

Commit

Permalink
bringup rviz
Browse files Browse the repository at this point in the history
current rviz config is not supported in ROS2
  • Loading branch information
hsd-dev committed Jun 9, 2022
1 parent 64c4d08 commit d01c6d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pf_description/launch/pf_bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,25 @@ def launch_setup(context, *args, **kwargs):
package=package_name).find(package_name)
scanner_description_path = os.path.join(
pkg_share, 'urdf', scanner_arg + '_world.urdf.xacro')
rviz_config_path = os.path.join(pkg_share, 'config', scanner_arg + '.rviz')

robot_state_publisher_node = launch_ros.actions.Node(
package='robot_state_publisher',
executable='robot_state_publisher',
output='screen',
parameters=[{'robot_description': Command(
['xacro ', scanner_description_path])}]
)

rviz2_node = launch_ros.actions.Node(
package='rviz2',
executable='rviz2',
output='screen',
arguments=['-d' + rviz_config_path],
)

return [robot_state_publisher_node, rviz2_node]


def generate_launch_description():
return launch.LaunchDescription([
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions pf_description/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
('share/' + package_name, ['package.xml']),
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
(os.path.join('share', package_name, 'meshes'), glob('meshes/*')),
(os.path.join('share', package_name, 'rviz'), glob('rviz/*')),
(os.path.join('share', package_name, 'urdf'), glob('urdf/*')),
],
install_requires=['setuptools'],
Expand Down

0 comments on commit d01c6d1

Please sign in to comment.