Skip to content

Commit 94ec2e5

Browse files
authored
Small fixes to tutorials (#529)
1 parent 27faa8e commit 94ec2e5

File tree

11 files changed

+80
-51
lines changed

11 files changed

+80
-51
lines changed

doc/examples/creating_moveit_plugins/lerp_motion_planner/src/lerp_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main(int argc, char** argv)
6767
robot_model_loader::RobotModelLoaderPtr robot_model_loader(
6868
new robot_model_loader::RobotModelLoader(ROBOT_DESCRIPTION));
6969

70-
// Create a planing scene monitor
70+
// Create a planning scene monitor
7171
planning_scene_monitor::PlanningSceneMonitorPtr psm(
7272
new planning_scene_monitor::PlanningSceneMonitor(robot_model_loader));
7373

doc/examples/motion_planning_pipeline/src/motion_planning_pipeline_tutorial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int main(int argc, char** argv)
7575
robot_model_loader::RobotModelLoaderPtr robot_model_loader(
7676
new robot_model_loader::RobotModelLoader(node, "robot_description"));
7777

78-
// Using the RobotModelLoader, we can construct a planing scene monitor that
78+
// Using the RobotModelLoader, we can construct a planning scene monitor that
7979
// will create a planning scene, monitors planning scene diffs, and apply the diffs to it's
8080
// internal planning scene. We then call startSceneMonitor, startWorldGeometryMonitor and
8181
// startStateMonitor to fully initialize the planning scene monitor

doc/examples/trajopt_planner/src/trajopt_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
3939
robot_model_loader::RobotModelLoaderPtr robot_model_loader(
4040
new robot_model_loader::RobotModelLoader(ROBOT_DESCRIPTION));
4141

42-
// Create a planing scene monitor
42+
// Create a planning scene monitor
4343
planning_scene_monitor::PlanningSceneMonitorPtr psm(
4444
new planning_scene_monitor::PlanningSceneMonitor(robot_model_loader));
4545

doc/tutorials/pick_and_place_with_moveit_task_constructor/pick_and_place_with_moveit_task_constructor.rst

Lines changed: 52 additions & 23 deletions
Large diffs are not rendered by default.

doc/tutorials/pick_and_place_with_moveit_task_constructor/src/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ class MTCTaskNode
3636
rclcpp::Node::SharedPtr node_;
3737
};
3838

39-
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr MTCTaskNode::getNodeBaseInterface()
39+
MTCTaskNode::MTCTaskNode(const rclcpp::NodeOptions& options)
40+
: node_{ std::make_shared<rclcpp::Node>("mtc_node", options) }
4041
{
41-
return node_->get_node_base_interface();
4242
}
4343

44-
MTCTaskNode::MTCTaskNode(const rclcpp::NodeOptions& options)
45-
: node_{ std::make_shared<rclcpp::Node>("mtc_node", options) }
44+
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr MTCTaskNode::getNodeBaseInterface()
4645
{
46+
return node_->get_node_base_interface();
4747
}
4848

4949
void MTCTaskNode::setupPlanningScene()

doc/tutorials/pick_and_place_with_moveit_task_constructor/src/minimal.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ class MTCTaskNode
3636
rclcpp::Node::SharedPtr node_;
3737
};
3838

39-
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr MTCTaskNode::getNodeBaseInterface()
39+
MTCTaskNode::MTCTaskNode(const rclcpp::NodeOptions& options)
40+
: node_{ std::make_shared<rclcpp::Node>("mtc_node", options) }
4041
{
41-
return node_->get_node_base_interface();
4242
}
4343

44-
MTCTaskNode::MTCTaskNode(const rclcpp::NodeOptions& options)
45-
: node_{ std::make_shared<rclcpp::Node>("mtc_node", options) }
44+
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr MTCTaskNode::getNodeBaseInterface()
4645
{
46+
return node_->get_node_base_interface();
4747
}
4848

4949
void MTCTaskNode::setupPlanningScene()

doc/tutorials/planning_around_objects/hello_moveit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int main(int argc, char* argv[])
114114
{
115115
draw_title("Planning Failed!");
116116
moveit_visual_tools.trigger();
117-
RCLCPP_ERROR(logger, "Planing failed!");
117+
RCLCPP_ERROR(logger, "Planning failed!");
118118
}
119119

120120
// Shutdown ROS

doc/tutorials/visualizing_in_rviz/hello_moveit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(int argc, char* argv[])
8181
{
8282
draw_title("Planning Failed!");
8383
moveit_visual_tools.trigger();
84-
RCLCPP_ERROR(logger, "Planing failed!");
84+
RCLCPP_ERROR(logger, "Planning failed!");
8585
}
8686

8787
// Shutdown ROS

doc/tutorials/visualizing_in_rviz/visualizing_in_rviz.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,10 @@ After we've constructed and initialized, we now create some closures (function o
144144

145145
Each of the three closures capture ``moveit_visual_tools`` by reference and the last one captures a pointer to the joint model group object we are planning with.
146146
Each of these call a function on ``moveit_visual_tools`` that changes something in RViz.
147-
The first one, ``draw_title`` adds text one meter above the base of the robot.
148-
This is a useful way to show the state of your program from a high level.
149-
The second one calls a function called ``prompt``.
150-
This function blocks your program until the user presses the ``next`` button in RViz.
151-
This is helpful for stepping through a program when debugging.
152-
The last one draws the tool path of a trajectory that we have planned.
153-
This is often helpful for understanding a planned trajectory from the perspective of the tool.
147+
148+
* The first one, ``draw_title`` adds text one meter above the base of the robot. This is a useful way to show the state of your program from a high level.
149+
* The second one calls a function called ``prompt``. This function blocks your program until the user presses the ``next`` button in RViz. This is helpful for stepping through a program when debugging.
150+
* The last one draws the tool path of a trajectory that we have planned. This is often helpful for understanding a planned trajectory from the perspective of the tool.
154151

155152
You might be asking yourself why we would create lambdas like this, and the reason is simply to make the code that comes later easier to read and understand.
156153
As your write software, it is often helpful to break up your functionality into named functions which can be easily reused and tested on their own.
@@ -196,7 +193,7 @@ Update your code for planning and executing to include these new features:
196193
} else {
197194
draw_title("Planning Failed!");
198195
moveit_visual_tools.trigger();
199-
RCLCPP_ERROR(logger, "Planing failed!");
196+
RCLCPP_ERROR(logger, "Planning failed!");
200197
}
201198

202199
One thing you'll quickly notice is that we have to call a method called ``trigger`` on ``moveit_visual_tools`` after each call to change something rendered in RViz.

doc/tutorials/your_first_project/hello_moveit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int main(int argc, char* argv[])
4242
}
4343
else
4444
{
45-
RCLCPP_ERROR(logger, "Planing failed!");
45+
RCLCPP_ERROR(logger, "Planning failed!");
4646
}
4747

4848
// Shutdown ROS

0 commit comments

Comments
 (0)