Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool communication parameter tool_rx_idle_chars/tool_tx_idle_chars is not set correctly #726

Closed
1 task done
kamikat opened this issue Sep 25, 2024 · 1 comment · Fixed by #729
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@kamikat
Copy link

kamikat commented Sep 25, 2024

Affected ROS Driver version(s)

master

Used ROS distribution.

Noetic

Which combination of platform is the ROS driver running on.

Linux

How is the UR ROS Driver installed.

Build the driver from source and using the UR Client Library from binary

Which robot platform is the driver connected to.

UR E-series robot

Robot SW / URSim version(s)

5.12.5

How is the ROS driver used.

Others

Issue details

Summary

Launch parameter tool_rx_idle_chars/tool_tx_idle_chars is not correctly set for tool communication.

Issue details

Steps to Reproduce

  1. Launch driver with use_tool_communication:=true
  2. Open I/O panel on PolyScope

Expected Behavior

I/O panel on PolyScope shows "RX Idle Chars: 1.5 / TX Idle Chars: 3.5"

Actual Behavior

I/O panel on PolyScope shows "RX Idle Chars: 2 / TX Idle Chars: 4"

Workaround Suggestion

Patch rx_idle_chars and tx_idle_chars to float type.

int rx_idle_chars;
// Number of idle chars for the RX unit used for tool communication. Will be set as soon as the UR-Program on the
// robot is started. Valid values: min=1.0, max=40.0
//
// Note: This parameter is only evaluated, when the parameter "use_tool_communication"
// is set to TRUE. Then, this parameter is required.
if (!robot_hw_nh.getParam("tool_rx_idle_chars", rx_idle_chars))
{
ROS_ERROR_STREAM("Required parameter " << robot_hw_nh.resolveName("tool_rx_idle_chars") << " not given.");
return false;
}
tool_comm_setup->setRxIdleChars(rx_idle_chars);

int tx_idle_chars;
// Number of idle chars for the TX unit used for tool communication. Will be set as soon as the UR-Program on the
// robot is started. Valid values: min=0.0, max=40.0
//
// Note: This parameter is only evaluated, when the parameter "use_tool_communication"
// is set to TRUE. Then, this parameter is required.
if (!robot_hw_nh.getParam("tool_tx_idle_chars", tx_idle_chars))
{
ROS_ERROR_STREAM("Required parameter " << robot_hw_nh.resolveName("tool_tx_idle_chars") << " not given.");
return false;
}
tool_comm_setup->setTxIdleChars(tx_idle_chars);

Relevant log output

No response

Accept Public visibility

  • I agree to make this context public
@fmauch fmauch self-assigned this Oct 9, 2024
@fmauch
Copy link
Collaborator

fmauch commented Oct 9, 2024

Oh my, this is absolutely correct! I'll provide a fix ASAP.

@fmauch fmauch added the bug Something isn't working label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants