1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 18:10:47 +02:00

Fixed issues preventing from compiling on Kinetic

This commit is contained in:
Simon Rasmussen
2017-07-17 23:30:39 +02:00
parent 8e8a0428b0
commit a170b9f51e
4 changed files with 17 additions and 5 deletions

View File

@@ -33,21 +33,23 @@ void ROSController::doSwitch(const std::list<hardware_interface::ControllerInfo>
for (auto const& ci : start_list)
{
auto ait = available_interfaces_.find(ci.hardware_interface);
auto ait = available_interfaces_.find(ci.name);
if (ait == available_interfaces_.end())
continue;
auto new_interface = ait->second;
LOG_INFO("Starting %s", ci.hardware_interface.c_str());
LOG_INFO("Starting %s", ci.name.c_str());
active_interface_ = new_interface;
new_interface->start();
return;
}
LOG_WARN("Failed to start interface!");
if(start_list.size() > 0)
LOG_WARN("Failed to start interface!");
}
bool ROSController::write()

View File

@@ -1,6 +1,7 @@
#include "ur_modern_driver/ros/hardware_interface.h"
#include "ur_modern_driver/log.h"
const std::string JointInterface::INTERFACE_NAME = "joint_state_controller";
JointInterface::JointInterface(std::vector<std::string> &joint_names)
{
for (size_t i = 0; i < 6; i++)
@@ -16,6 +17,8 @@ void JointInterface::update(RTShared &packet)
efforts_ = packet.i_actual;
}
const std::string WrenchInterface::INTERFACE_NAME = "force_torque_sensor_controller";
WrenchInterface::WrenchInterface()
{
registerHandle(hardware_interface::ForceTorqueSensorHandle("wrench", "", tcp_.begin(), tcp_.begin() + 3));
@@ -26,6 +29,8 @@ void WrenchInterface::update(RTShared &packet)
tcp_ = packet.tcp_force;
}
const std::string VelocityInterface::INTERFACE_NAME = "vel_based_pos_traj_controller";
VelocityInterface::VelocityInterface(URCommander &commander, hardware_interface::JointStateInterface &js_interface,
std::vector<std::string> &joint_names, double max_vel_change)
: commander_(commander), max_vel_change_(max_vel_change)
@@ -57,6 +62,7 @@ void VelocityInterface::reset()
}
}
const std::string PositionInterface::INTERFACE_NAME = "pos_based_pos_traj_controller";
PositionInterface::PositionInterface(TrajectoryFollower &follower,
hardware_interface::JointStateInterface &js_interface,
std::vector<std::string> &joint_names)