File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
doc/examples/realtime_servo/src Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 41
41
// ROS
42
42
#include < rclcpp/rclcpp.hpp>
43
43
44
- // Servo
45
- #include < moveit_servo/servo_parameters.h >
44
+ // Auto-generated
45
+ #include < moveit_servo_lib_parameters.hpp >
46
46
#include < moveit_servo/servo.h>
47
47
#include < moveit/planning_scene_monitor/planning_scene_monitor.h>
48
48
@@ -166,21 +166,14 @@ int main(int argc, char** argv)
166
166
167
167
// Initializing Servo
168
168
// ^^^^^^^^^^^^^^^^^^
169
- // Servo requires a number of parameters to dictate its behavior. These can be read automatically by using the
170
- // :code:`makeServoParameters` helper function
171
- auto servo_parameters = moveit_servo::ServoParameters::makeServoParameters (node_);
172
- if (!servo_parameters)
173
- {
174
- RCLCPP_FATAL (LOGGER, " Failed to load the servo parameters" );
175
- return EXIT_FAILURE;
176
- }
169
+ auto servo_param_listener = std::make_unique<const servo::ParamListener>(node_);
177
170
178
171
// Initialize the Servo C++ interface by passing a pointer to the node, the parameters, and the PSM
179
- auto servo = std::make_unique< moveit_servo::Servo> (node_, servo_parameters, planning_scene_monitor );
172
+ moveit_servo::Servo servo (node_, planning_scene_monitor, std::move (servo_param_listener) );
180
173
181
174
// You can start Servo directly using the C++ interface. If launched using the alternative ServoNode, a ROS
182
175
// service is used to start Servo. Before it is started, MoveIt Servo will not accept any commands or move the robot
183
- servo-> start ();
176
+ servo. start ();
184
177
185
178
// Sending Commands
186
179
// ^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments