-
Notifications
You must be signed in to change notification settings - Fork 241
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
Failure During Hardware Component Reconfiguration #1097
Comments
Thank you for reporting this and already suggesting a way of resolving the issue. To implement this it would be nice to have a test case actually covering this, though. I'll add a draft PR with the changes you suggested but before merging I would like to have tests for changing the lifecycle state. Unfortunately, I don't know how much time I will have available to spend on this. |
Thank you for your quick response and for moving forward with the draft PR! I agree that having a test case to cover the changes would be ideal before merging. What kind of tests are you thinking of adding to cover the lifecycle state change? I'd be happy to assist with writing or reviewing the tests if needed, especially if you're short on time. By the way, I also opened a PR in |
If you could help out writing tests for this, that would be great! Basically, I think a short integration test that starts the robot, cycles the states down and up once more, making sure the available interfaces match the lifecycle state on the way. |
For reference: I created a separate issue regarding the tests: #1160 |
Affected ROS2 Driver version(s)
2.2.14
Used ROS distribution.
Humble
Which combination of platform is the ROS driver running on.
Ubuntu Linux with standard kernel
How is the UR ROS2 Driver installed.
Build both the ROS driver and UR Client Library from source
Which robot platform is the driver connected to.
UR E-series robot
Robot SW / URSim version(s)
5.17.0
How is the ROS driver used.
Headless without using the teach pendant
Problem Description
Reconfiguring the UR hardware component (which can be done using the
~/set_hardware_component_state
service call to unconfigure and then activate the UR hardware component) results in a code failure due to following issuesregisterUrclLogHandler()
function which is called in theon_configure()
function usesstd::move
to transfer ownership ofg_log_handler
. As a result, calling theon_configure()
function again causes a failure. This is because theg_log_handler
pointer has already been moved, and it no longer has access to thesetTFPrefix()
function.checkAsyncIO()
function cannot be called in theasyncThread()
function after reconfiguring the hardware component. This is because theasync_thread_shutdown_
variable is set to true in theon_cleanup()
function and is not reset to false in theon_configure()
function.Workaround Suggestion
To avoid such crashes, following changes are suggested
registerUrclLogHandler()
function instead of doing so globally. Therefore, it is suggested to modify the function as follows:async_thread_shutdown_
tofalse
inon_configure()
functionAccept Public visibility
The text was updated successfully, but these errors were encountered: