@@ -95,9 +95,9 @@ URPositionHardwareInterface::on_init(const hardware_interface::HardwareInfo& sys
9595 system_interface_initialized_ = 0.0 ;
9696
9797 for (const hardware_interface::ComponentInfo& joint : info_.joints ) {
98- if (joint.command_interfaces .size () != 2 ) {
98+ if (joint.command_interfaces .size () != 5 ) {
9999 RCLCPP_FATAL (rclcpp::get_logger (" URPositionHardwareInterface" ),
100- " Joint '%s' has %zu command interfaces found. 2 expected." , joint.name .c_str (),
100+ " Joint '%s' has %zu command interfaces found. 5 expected." , joint.name .c_str (),
101101 joint.command_interfaces .size ());
102102 return hardware_interface::CallbackReturn::ERROR;
103103 }
@@ -243,6 +243,15 @@ std::vector<hardware_interface::CommandInterface> URPositionHardwareInterface::e
243243
244244 command_interfaces.emplace_back (hardware_interface::CommandInterface (
245245 info_.joints [i].name , hardware_interface::HW_IF_VELOCITY, &urcl_velocity_commands_[i]));
246+
247+ command_interfaces.emplace_back (hardware_interface::CommandInterface (info_.joints [i].name , " passthrough_position" ,
248+ &passthrough_trajectory_positions_[i]));
249+
250+ command_interfaces.emplace_back (hardware_interface::CommandInterface (info_.joints [i].name , " passthrough_velocity" ,
251+ &passthrough_trajectory_velocities_[i]));
252+
253+ command_interfaces.emplace_back (hardware_interface::CommandInterface (
254+ info_.joints [i].name , " passthrough_acceleration" , &passthrough_trajectory_accelerations_[i]));
246255 }
247256 // Obtain the tf_prefix from the urdf so that we can have the general interface multiple times
248257 // NOTE using the tf_prefix at this point is some kind of workaround. One should actually go through the list of gpio
0 commit comments