File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 22
22
#include < vector>
23
23
24
24
#include " ign_ros2_control/ign_system_interface.hpp"
25
- #include " ign_ros2_control_parameters.hpp"
26
25
27
26
#include " rclcpp/executors/single_threaded_executor.hpp"
28
27
#include " rclcpp_lifecycle/state.hpp"
29
28
#include " rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
30
29
30
+ #include " ign_ros2_control_parameters.hpp"
31
31
32
32
namespace ign_ros2_control
33
33
{
Original file line number Diff line number Diff line change @@ -371,6 +371,9 @@ void MimicJointSystem::PreUpdate(
371
371
return ;
372
372
}
373
373
374
+ // If the mode is not ABS, default mode is PID
375
+ // (e.g.) MimicJointSystemPrivate::OperationMode::PID
376
+
374
377
// Update force command.
375
378
double force = this ->dataPtr ->posPid .Update (error, _info.dt );
376
379
@@ -391,14 +394,12 @@ void MimicJointSystem::Update(
391
394
const ignition::gazebo::UpdateInfo & /* _info*/ ,
392
395
ignition::gazebo::EntityComponentManager & /* _ecm*/ )
393
396
{
394
- // ignmsg << "MimicJointSystem::Update" << std::endl;
395
397
}
396
398
397
399
void MimicJointSystem::PostUpdate (
398
400
const ignition::gazebo::UpdateInfo & /* _info*/ ,
399
401
const ignition::gazebo::EntityComponentManager & /* _ecm*/ )
400
402
{
401
- // ignmsg << "MimicJointSystem::PostUpdate" << std::endl;
402
403
}
403
404
404
405
// ! [registerMimicJointSystem]
Original file line number Diff line number Diff line change 43
43
#include < ignition/gazebo/components/Sensor.hh>
44
44
45
45
// pid_pos stuff
46
- #include < gz /math/PID.hh>
46
+ #include < ignition /math/PID.hh>
47
47
48
48
#include < ignition/transport/Node.hh>
49
49
@@ -79,10 +79,10 @@ struct jointData
79
79
ignition::gazebo::Entity sim_joint;
80
80
81
81
// / \brief PID for position control
82
- gz ::math::PID pid_pos;
82
+ ignition ::math::PID pid_pos;
83
83
84
84
// / \brief PID for velocity control
85
- gz ::math::PID pid_vel;
85
+ ignition ::math::PID pid_vel;
86
86
87
87
// / \brief Control method defined in the URDF for each joint.
88
88
ign_ros2_control::IgnitionSystemInterface::ControlMethod joint_control_method;
@@ -1098,9 +1098,8 @@ hardware_interface::return_type IgnitionSystem::write(
1098
1098
}
1099
1099
}
1100
1100
}
1101
-
1102
- return hardware_interface::return_type::OK;
1103
1101
}
1102
+ return hardware_interface::return_type::OK;
1104
1103
}
1105
1104
1106
1105
} // namespace ign_ros2_control
You can’t perform that action at this time.
0 commit comments