Skip to content

Commit

Permalink
Use lexical casts
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Jan 8, 2024
1 parent 4a2170c commit 8ac8545
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gz_ros2_control/src/gz_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ bool GazeboSimSystem::initSim(
hardware_info.joints.begin(), mimicked_joint_it);
auto param_it = joint_info.parameters.find("multiplier");
if (param_it != joint_info.parameters.end()) {
mimic_joint.multiplier = std::stod(joint_info.parameters.at("multiplier"));
mimic_joint.multiplier = hardware_interface::stod(joint_info.parameters.at("multiplier"));
} else {
mimic_joint.multiplier = 1.0;
}
Expand Down Expand Up @@ -336,7 +336,7 @@ bool GazeboSimSystem::initSim(

auto get_initial_value = [this](const hardware_interface::InterfaceInfo & interface_info) {
if (!interface_info.initial_value.empty()) {
double value = std::stod(interface_info.initial_value);
double value = hardware_interface::stod(interface_info.initial_value);
RCLCPP_INFO(this->nh_->get_logger(), "\t\t\t found initial value: %f", value);
return value;
} else {
Expand Down

0 comments on commit 8ac8545

Please sign in to comment.