Skip to content

Commit

Permalink
Fixed merge
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Feb 13, 2024
1 parent 53b400b commit 5283061
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions gz_ros2_control/src/gz_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,8 @@ bool GazeboSimSystem::initSim(
[this, joint_name](const hardware_interface::InterfaceInfo & interface_info) {
double initial_value{0.0};
if (!interface_info.initial_value.empty()) {
<<<<<<< HEAD
double value = std::stod(interface_info.initial_value);
RCLCPP_INFO(this->nh_->get_logger(), "\t\t\t found initial value: %f", value);
return value;
} else {
return 0.0;
=======
try {
initial_value = hardware_interface::stod(interface_info.initial_value);
initial_value = std::stod(interface_info.initial_value);
RCLCPP_INFO(this->nh_->get_logger(), "\t\t\t found initial value: %f", initial_value);
} catch (std::invalid_argument &) {
RCLCPP_ERROR_STREAM(
Expand All @@ -330,7 +323,6 @@ bool GazeboSimSystem::initSim(
<< ". Initial value will be set to 0.0");
throw std::invalid_argument("Failed converting initial_value string");
}
>>>>>>> a3beadb (Fix crashing due to an invalid parameter in the initial value (#233))
}
return initial_value;
};
Expand Down

0 comments on commit 5283061

Please sign in to comment.