Skip to content

Commit 776a657

Browse files
author
AndyZe
authored
Fix the "Quickstart Tutorial" launching (#520)
1 parent 735ac3e commit 776a657

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

doc/tutorials/quickstart_in_rviz/launch/demo.launch.py

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,10 @@
1111

1212
def generate_launch_description():
1313

14-
# Command-line arguments
15-
tutorial_arg = DeclareLaunchArgument(
16-
"rviz_tutorial", default_value="False", description="Tutorial flag"
17-
)
18-
19-
# planning_context
2014
moveit_config = (
2115
MoveItConfigsBuilder("moveit_resources_panda")
2216
.robot_description(file_path="config/panda.urdf.xacro")
2317
.trajectory_execution(file_path="config/gripper_moveit_controllers.yaml")
24-
.planning_scene_monitor(
25-
publish_robot_description=True, publish_robot_description_semantic=True
26-
)
27-
.planning_pipelines(pipelines=["ompl"])
2818
.to_moveit_configs()
2919
)
3020

@@ -36,38 +26,23 @@ def generate_launch_description():
3626
parameters=[moveit_config.to_dict()],
3727
)
3828

39-
# RViz
40-
tutorial_mode = LaunchConfiguration("rviz_tutorial")
4129
rviz_base = os.path.join(get_package_share_directory("moveit2_tutorials"), "launch")
42-
rviz_full_config = os.path.join(rviz_base, "panda_moveit_config_demo.rviz")
43-
rviz_empty_config = os.path.join(rviz_base, "panda_moveit_config_demo_empty.rviz")
44-
rviz_node_tutorial = Node(
45-
package="rviz2",
46-
executable="rviz2",
47-
name="rviz2",
48-
output="log",
49-
arguments=["-d", rviz_empty_config],
50-
parameters=[
51-
moveit_config.robot_description,
52-
moveit_config.robot_description_semantic,
53-
moveit_config.robot_description_kinematics,
54-
moveit_config.planning_pipelines,
55-
],
56-
condition=IfCondition(tutorial_mode),
57-
)
30+
rviz_config = os.path.join(rviz_base, "panda_moveit_config_demo.rviz")
31+
32+
# RViz
5833
rviz_node = Node(
5934
package="rviz2",
6035
executable="rviz2",
6136
name="rviz2",
6237
output="log",
63-
arguments=["-d", rviz_full_config],
38+
arguments=["-d", rviz_config],
6439
parameters=[
6540
moveit_config.robot_description,
6641
moveit_config.robot_description_semantic,
6742
moveit_config.robot_description_kinematics,
6843
moveit_config.planning_pipelines,
44+
moveit_config.joint_limits,
6945
],
70-
condition=UnlessCondition(tutorial_mode),
7146
)
7247

7348
# Static TF
@@ -127,9 +102,7 @@ def generate_launch_description():
127102

128103
return LaunchDescription(
129104
[
130-
tutorial_arg,
131105
rviz_node,
132-
rviz_node_tutorial,
133106
static_tf,
134107
robot_state_publisher,
135108
run_move_group_node,

doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Step 1: Launch the Demo and Configure the Plugin
1414

1515
* Launch the demo: ::
1616

17-
ros2 launch moveit2_tutorials demo.launch.py rviz_tutorial:=true
17+
ros2 launch moveit2_tutorials demo.launch.py
1818

1919
* If you are doing this for the first time, you should see an empty world in RViz and will have to add the Motion Planning Plugin:
2020

0 commit comments

Comments
 (0)