mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-12 19:10:47 +02:00
send keepalive signals only if the program is running
when no program is running, we do not want to fill the buffer anyway.
This commit is contained in:
committed by
Tristan Schnell
parent
6aa2670eba
commit
6979ec35e0
@@ -287,9 +287,10 @@ void HardwareInterface ::read(const ros::Time& time, const ros::Duration& period
|
||||
|
||||
void HardwareInterface ::write(const ros::Time& time, const ros::Duration& period)
|
||||
{
|
||||
if (position_controller_running_ &&
|
||||
(runtime_state_ == static_cast<uint32_t>(rtde_interface::RUNTIME_STATE::PLAYING) ||
|
||||
runtime_state_ == static_cast<uint32_t>(rtde_interface::RUNTIME_STATE::PAUSING)))
|
||||
if (runtime_state_ == static_cast<uint32_t>(rtde_interface::RUNTIME_STATE::PLAYING) ||
|
||||
runtime_state_ == static_cast<uint32_t>(rtde_interface::RUNTIME_STATE::PAUSING))
|
||||
{
|
||||
if (position_controller_running_)
|
||||
{
|
||||
ur_driver_->writeJointCommand(joint_position_command_);
|
||||
}
|
||||
@@ -297,6 +298,7 @@ void HardwareInterface ::write(const ros::Time& time, const ros::Duration& perio
|
||||
{
|
||||
ur_driver_->writeKeepalive();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool HardwareInterface ::prepareSwitch(const std::list<hardware_interface::ControllerInfo>& start_list,
|
||||
|
||||
Reference in New Issue
Block a user