Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210910794
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210910794
Commits
cd239d60
Unverified
Commit
cd239d60
authored
Oct 28, 2019
by
Carlos A. Orduno
Committed by
GitHub
Oct 28, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Launch RVIZ using launch_ros::Actions::Node (#1286)
parent
ec4904be
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nav2_bringup/bringup/launch/nav2_tb3_simulation_launch.py
+13
-31
13 additions, 31 deletions
nav2_bringup/bringup/launch/nav2_tb3_simulation_launch.py
with
13 additions
and
31 deletions
nav2_bringup/bringup/launch/nav2_tb3_simulation_launch.py
+
13
−
31
View file @
cd239d60
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
import
os
import
os
from
ament_index_python.packages
import
get_package_prefix
,
get_package_share_directory
from
ament_index_python.packages
import
get_package_share_directory
from
launch
import
LaunchDescription
from
launch
import
LaunchDescription
from
launch.actions
import
(
DeclareLaunchArgument
,
EmitEvent
,
ExecuteProcess
,
from
launch.actions
import
(
DeclareLaunchArgument
,
EmitEvent
,
ExecuteProcess
,
...
@@ -152,37 +152,19 @@ def generate_launch_description():
...
@@ -152,37 +152,19 @@ def generate_launch_description():
remappings
=
remappings
,
remappings
=
remappings
,
arguments
=
[
urdf
])
arguments
=
[
urdf
])
# TODO(orduno) RVIZ crashing if launched as a node: https://github.com/ros2/rviz/issues/442
start_rviz_cmd
=
Node
(
# Launching as node works after applying the change described on the github issue.
# Once fixed, launch by providing the remappings:
# rviz_remappings = [('/tf', 'tf'),
# ('/tf_static', 'tf_static'),
# ('goal_pose', 'goal_pose'),
# ('/clicked_point', 'clicked_point'),
# ('/initialpose', 'initialpose'),
# ('/parameter_events', 'parameter_events'),
# ('/rosout', 'rosout')]
# start_rviz_cmd = Node(
# package='rviz2',
# node_executable='rviz2',
# node_name='rviz2',
# arguments=['-d', rviz_config_file],
# output='screen',
# use_remappings=IfCondition(use_remappings),
# remappings=rviz_remappings)
start_rviz_cmd
=
ExecuteProcess
(
condition
=
IfCondition
(
use_rviz
),
condition
=
IfCondition
(
use_rviz
),
cmd
=
[
os
.
path
.
join
(
get_package_prefix
(
'
rviz2
'
),
'
lib/rviz2/rviz2
'
),
package
=
'
rviz2
'
,
[
'
-d
'
,
rviz_config_file
],
node_executable
=
'
rviz2
'
,
[
'
__ns:=/
'
,
namespace
],
node_name
=
'
rviz2
'
,
'
/tf:=tf
'
,
arguments
=
[
'
-d
'
,
rviz_config_file
],
'
/tf_static:=tf_static
'
,
output
=
'
screen
'
,
'
/goal_pose:=goal_pose
'
,
use_remappings
=
IfCondition
(
use_remappings
),
'
/clicked_point:=clicked_point
'
,
remappings
=
[(
'
/tf
'
,
'
tf
'
),
'
/initialpose:=initialpose
'
],
(
'
/tf_static
'
,
'
tf_static
'
),
cwd
=
[
launch_dir
],
output
=
'
screen
'
)
(
'
goal_pose
'
,
'
goal_pose
'
),
(
'
/clicked_point
'
,
'
clicked_point
'
),
(
'
/initialpose
'
,
'
initialpose
'
)])
exit_event_handler
=
RegisterEventHandler
(
exit_event_handler
=
RegisterEventHandler
(
event_handler
=
OnProcessExit
(
event_handler
=
OnProcessExit
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment