Skip to content

Commit

Permalink
fix: reduce update rate
Browse files Browse the repository at this point in the history
  • Loading branch information
ChandimaFernando committed Oct 30, 2024
1 parent d3ac840 commit 8ae70d3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 12 deletions.
14 changes: 14 additions & 0 deletions src/pdf_beamtime/src/beamtime_entrypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ int main(int argc, char * argv[])
{"robot_description", parameters[1].value_to_string()}
});

// Lower the update rate to the controller
auto controller_manager_parameters_client =
std::make_shared<rclcpp::SyncParametersClient>(parameter_client_node, "controller_manager");
// Boiler plate wait block
while (!controller_manager_parameters_client->wait_for_service(1s)) {
if (!rclcpp::ok()) {
RCLCPP_ERROR(
logger, "Interrupted while waiting for the service. Exiting.");
return 0;
}
RCLCPP_INFO(logger, "controller_manager service not available, waiting again...");
}
controller_manager_parameters_client->set_parameters({rclcpp::Parameter("update_rate", 100)});

rclcpp::executors::MultiThreadedExecutor executor;

auto beamtime_server = std::make_shared<PdfBeamtimeServer>(
Expand Down
14 changes: 14 additions & 0 deletions src/pdf_beamtime/src/beamtime_fidpose_entrypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ int main(int argc, char * argv[])
{"robot_description", parameters[1].value_to_string()}
});

// Lower the update rate to the controller
auto controller_manager_parameters_client =
std::make_shared<rclcpp::SyncParametersClient>(parameter_client_node, "controller_manager");
// Boiler plate wait block
while (!controller_manager_parameters_client->wait_for_service(1s)) {
if (!rclcpp::ok()) {
RCLCPP_ERROR(
logger, "Interrupted while waiting for the service. Exiting.");
return 0;
}
RCLCPP_INFO(logger, "controller_manager service not available, waiting again...");
}
controller_manager_parameters_client->set_parameters({rclcpp::Parameter("update_rate", 100)});

rclcpp::executors::MultiThreadedExecutor executor;

auto beamtime_server = std::make_shared<PdfBeamtimeFidPoseServer>(
Expand Down
24 changes: 12 additions & 12 deletions src/ur3e_hande_moveit_config/config/joint_limits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

joint_limits:
shoulder_pan_joint:
has_acceleration_limits: true
max_acceleration: 1.0
has_velocity_limits: true
max_velocity: 1.0
shoulder_lift_joint:
has_acceleration_limits: true
max_acceleration: 1.0
has_velocity_limits: true
max_velocity: 1.0
elbow_joint:
has_acceleration_limits: true
max_acceleration: 1.0
has_velocity_limits: true
max_velocity: 1.0
wrist_1_joint:
has_acceleration_limits: true
max_acceleration: 1.0
has_velocity_limits: true
max_velocity: 1.0
wrist_2_joint:
has_acceleration_limits: true
max_acceleration: 1.0
has_velocity_limits: true
max_velocity: 1.0
wrist_3_joint:
has_acceleration_limits: true
max_acceleration: 1.0
has_velocity_limits: true
max_velocity: 1.0

0 comments on commit 8ae70d3

Please sign in to comment.