mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-09 17:40:47 +02:00
Move debug output to DEBUG stream
This commit is contained in:
committed by
Tristan Schnell
parent
00d20cb501
commit
75d6ae0a19
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
virtual ~Pipeline()
|
||||
{
|
||||
LOG_INFO("Destructing pipeline");
|
||||
LOG_DEBUG("Destructing pipeline");
|
||||
stop();
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
if (!running_)
|
||||
return;
|
||||
|
||||
LOG_INFO("Stopping pipeline! <%s>", name_.c_str());
|
||||
LOG_DEBUG("Stopping pipeline! <%s>", name_.c_str());
|
||||
|
||||
if (consumer_ != nullptr)
|
||||
consumer_->stopConsumer();
|
||||
@@ -208,7 +208,7 @@ private:
|
||||
|
||||
void runProducer()
|
||||
{
|
||||
LOG_INFO("Starting up producer");
|
||||
LOG_DEBUG("Starting up producer");
|
||||
std::ifstream realtime_file("/sys/kernel/realtime", std::ios::in);
|
||||
bool has_realtime;
|
||||
realtime_file >> has_realtime;
|
||||
|
||||
@@ -56,7 +56,7 @@ bool TCPSocket::setup(std::string& host, int port)
|
||||
if (state_ == SocketState::Connected)
|
||||
return false;
|
||||
|
||||
LOG_INFO("Setting up connection: %s:%d", host.c_str(), port);
|
||||
LOG_DEBUG("Setting up connection: %s:%d", host.c_str(), port);
|
||||
|
||||
// gethostbyname() is deprecated so use getadderinfo() as described in:
|
||||
// http://www.beej.us/guide/bgnet/output/html/multipage/syscalls.html#getaddrinfo
|
||||
@@ -100,7 +100,7 @@ bool TCPSocket::setup(std::string& host, int port)
|
||||
{
|
||||
setOptions(socket_fd_);
|
||||
state_ = SocketState::Connected;
|
||||
LOG_INFO("Connection established for %s:%d", host.c_str(), port);
|
||||
LOG_DEBUG("Connection established for %s:%d", host.c_str(), port);
|
||||
}
|
||||
return connected;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ bool HardwareInterface ::init(ros::NodeHandle& root_nh, ros::NodeHandle& robot_h
|
||||
// Create ros_control interfaces
|
||||
for (std::size_t i = 0; i < joint_positions_.size(); ++i)
|
||||
{
|
||||
ROS_INFO_STREAM("Registing handles for joint " << joint_names_[i]);
|
||||
ROS_DEBUG_STREAM("Registing handles for joint " << joint_names_[i]);
|
||||
// Create joint state interface for all joints
|
||||
js_interface_.registerHandle(hardware_interface::JointStateHandle(joint_names_[i], &joint_positions_[i],
|
||||
&joint_velocities_[i], &joint_efforts_[i]));
|
||||
@@ -275,7 +275,6 @@ void HardwareInterface ::write(const ros::Time& time, const ros::Duration& perio
|
||||
(runtime_state_ == static_cast<uint32_t>(rtde_interface::RUNTIME_STATE::PLAYING) ||
|
||||
runtime_state_ == static_cast<uint32_t>(rtde_interface::RUNTIME_STATE::PAUSING)))
|
||||
{
|
||||
// ROS_INFO_STREAM("Writing command: " << joint_position_command_);
|
||||
ur_driver_->writeJointCommand(joint_position_command_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,9 +69,8 @@ int main(int argc, char** argv)
|
||||
ROS_ERROR_STREAM("Could not correctly initialize robot. Exiting");
|
||||
exit(1);
|
||||
}
|
||||
ROS_INFO_STREAM("initialized hw interface");
|
||||
ROS_DEBUG_STREAM("initialized hw interface");
|
||||
controller_manager::ControllerManager cm(g_hw_interface.get(), nh);
|
||||
ROS_INFO_STREAM("started controller manager");
|
||||
|
||||
// Get current time and elapsed time since last read
|
||||
timestamp = ros::Time::now();
|
||||
@@ -130,7 +129,6 @@ int main(int argc, char** argv)
|
||||
|
||||
double expected_cycle_time = 1.0 / (static_cast<double>(g_hw_interface->getControlFrequency()));
|
||||
|
||||
ROS_INFO("Starting control loop");
|
||||
// Run as fast as possible
|
||||
while (ros::ok())
|
||||
{
|
||||
|
||||
@@ -53,7 +53,8 @@ ur_driver::UrDriver::UrDriver(const std::string& robot_ip, const std::string& sc
|
||||
, reverse_interface_active_(false)
|
||||
, handle_program_state_(handle_program_state)
|
||||
{
|
||||
LOG_INFO("Initializing RTDE client");
|
||||
LOG_DEBUG("Initializing urdriver");
|
||||
LOG_DEBUG("Initializing RTDE client");
|
||||
rtde_client_.reset(new rtde_interface::RTDEClient(robot_ip, notifier_, recipe_file));
|
||||
|
||||
if (!rtde_client_->init())
|
||||
@@ -106,13 +107,13 @@ ur_driver::UrDriver::UrDriver(const std::string& robot_ip, const std::string& sc
|
||||
|
||||
script_sender_.reset(new comm::ScriptSender(script_sender_port, prog));
|
||||
script_sender_->start();
|
||||
LOG_INFO("Created script sender");
|
||||
LOG_DEBUG("Created script sender");
|
||||
|
||||
reverse_port_ = reverse_port;
|
||||
watchdog_thread_ = std::thread(&UrDriver::startWatchdog, this);
|
||||
|
||||
rtde_client_->start(); // TODO: Add extra start method (also to HW-Interface)
|
||||
LOG_INFO("Initialization done");
|
||||
LOG_DEBUG("Initialization done");
|
||||
}
|
||||
|
||||
std::unique_ptr<rtde_interface::DataPackage> ur_driver::UrDriver::getDataPackage()
|
||||
@@ -152,7 +153,7 @@ void UrDriver::startWatchdog()
|
||||
handle_program_state_(false);
|
||||
reverse_interface_.reset(new comm::ReverseInterface(reverse_port_));
|
||||
reverse_interface_active_ = true;
|
||||
LOG_INFO("Created reverse interface");
|
||||
LOG_DEBUG("Created reverse interface");
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user