@@ -37,47 +37,6 @@ namespace cartesian_vic_controller
37
37
38
38
controller_interface::CallbackReturn CartesianVicController::on_init ()
39
39
{
40
- <<<<<<< HEAD
41
- // Try to retrieve urdf (used by kinematics / dynamics plugin)
42
- std::string urdf_string;
43
- get_node ()->get_parameter (" robot_description" , urdf_string);
44
- if (urdf_string.empty ()) {
45
- RCLCPP_ERROR (
46
- get_node ()->get_logger (),
47
- " Could not find 'robot_description' parameter! Trying to retrieve URDF from param server..." );
48
- // TODO(tpoignonec): get URDF from param server
49
- urdf_string = getUrdfFromServer ();
50
- if (urdf_string.empty ()) {
51
- RCLCPP_ERROR (
52
- get_node ()->get_logger (), " Could not retrieve URDF from param server!" );
53
- return controller_interface::CallbackReturn::ERROR;
54
- } else {
55
- rclcpp::Parameter robot_description_param (" robot_description" , urdf_string);
56
- get_node ()->set_parameter (robot_description_param);
57
- // RCLCPP_INFO(get_node()->get_logger(), "URDF: %s", urdf_string.c_str());
58
- }
59
- }
60
-
61
- // initialize controller config
62
- try {
63
- parameter_handler_ =
64
- std::make_shared<cartesian_vic_controller::ParamListener>(get_node ());
65
- cartesian_vic_controller::Params parameters = parameter_handler_->get_params ();
66
- // number of joints in controllers is fixed after initialization
67
- num_joints_ = parameters.joints .size ();
68
- } catch (const std::exception & e) {
69
- RCLCPP_ERROR (
70
- get_node ()->get_logger (), " Exception thrown during init stage with message: %s \n " , e.what ());
71
- return controller_interface::CallbackReturn::ERROR;
72
- }
73
-
74
- // allocate dynamic memory
75
- measurement_data_ = MeasurementData (num_joints_);
76
- joint_command_ = measurement_data_.get_joint_state ();
77
- last_commanded_joint_state_ = measurement_data_.get_joint_state ();
78
-
79
- =======
80
- >>>>>>> 8175fc1 (Major fixes before experimentation (#30 ))
81
40
return controller_interface::CallbackReturn::SUCCESS;
82
41
}
83
42
@@ -207,8 +166,7 @@ controller_interface::CallbackReturn CartesianVicController::on_configure(
207
166
// Try to retrieve urdf (used by kinematics / dynamics plugin)
208
167
RCLCPP_INFO (
209
168
get_node ()->get_logger (), " Trying to retrieve 'robot_description' parameter..." );
210
- std::string urdf_string = auto_declare<std::string>(
211
- " robot_description" , this ->get_robot_description ());
169
+ std::string urdf_string = auto_declare<std::string>(" robot_description" , " " );
212
170
if (urdf_string.empty ()) {
213
171
RCLCPP_ERROR (
214
172
get_node ()->get_logger (),
@@ -771,22 +729,25 @@ bool CartesianVicController::is_command_interfaces_config_valid() const
771
729
if (has_position_command_interface_ || has_velocity_command_interface_) {
772
730
RCLCPP_ERROR (
773
731
get_node ()->get_logger (),
774
- " Impedance control mode is enabled, but unsupported position or velocity command interfaces are specified!" );
732
+ " Impedance control mode is enabled, but unsupported position or velocity"
733
+ " command interfaces are specified!" );
775
734
all_ok = false ;
776
735
}
777
736
} else if (vic_->get_control_mode () == cartesian_vic_controller::ControlMode::ADMITTANCE) {
778
737
// Check if claimed command interfaces are compatible with admittance control mode
779
738
if (!has_position_command_interface_ && !has_velocity_command_interface_) {
780
739
RCLCPP_ERROR (
781
740
get_node ()->get_logger (),
782
- " Admittance control mode is enabled, but no position or velocity command interface are specified!" );
741
+ " Admittance control mode is enabled, but no position or velocity command"
742
+ " interface are specified!" );
783
743
all_ok = false ;
784
744
}
785
745
786
746
if (has_effort_command_interface_) {
787
747
RCLCPP_ERROR (
788
748
get_node ()->get_logger (),
789
- " Admittance control mode is enabled, but an unsupported effort command interface is specified!" );
749
+ " Admittance control mode is enabled, but an unsupported effort command interface"
750
+ " is specified!" );
790
751
all_ok = false ;
791
752
}
792
753
} else {
0 commit comments