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

Expose diagnostic error codes #225

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

jessica-chen-ocado
Copy link

@jessica-chen-ocado jessica-chen-ocado commented Nov 14, 2024

PR to parse UR10 error codes from diagnostic logs that are streamed on the Primary Interface port 30001

@jessica-chen-ocado jessica-chen-ocado marked this pull request as ready for review November 14, 2024 18:53
@urfeex
Copy link
Member

urfeex commented Nov 15, 2024

Thank you very much for your contribution! I've wanted to extract parts of #186 since a long time, since that one got too big at some point. I'll have a deeper look at this ASAP.

@jessica-chen-ocado
Copy link
Author

@urfeex Any updates on this?

Copy link
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for tackling this. If we could restructure things a bit (and rename the ErrorCodeClient) so it could potentially be reused as a primary client with more features in future, I think we could get this merged.

src/primary/robot_message/error_code_message.cpp Outdated Show resolved Hide resolved
include/ur_client_library/ur/error_code_client.h Outdated Show resolved Hide resolved
tests/test_ur_driver.cpp Show resolved Hide resolved
@jessica-chen-ocado jessica-chen-ocado force-pushed the expose-diagnostic-error-codes branch from 5a65f3e to 93b0933 Compare January 13, 2025 20:02
@urfeex
Copy link
Member

urfeex commented Jan 14, 2025

@jessica-chen-ocado as you just rebased on current master: Do you plan to continue working on this based on our discussions previously?

@jessica-chen-ocado
Copy link
Author

@jessica-chen-ocado as you just rebased on current master: Do you plan to continue working on this based on our discussions previously?

There is a change in priority with my assigned tasks but yes I intend to work on this when I'm free and finish this PR.

@jessica-chen-ocado jessica-chen-ocado force-pushed the expose-diagnostic-error-codes branch from af13b93 to b264b21 Compare January 16, 2025 20:03
Copy link
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking almost good. It would be good to sort out the license headers before merging and I have a couple of suggestions. Thank you for following up on this. This should give us a solid base to implement more features from #186 in the future.

src/primary/primary_client.cpp Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add license headers for new files, preferably BSD-3-Clause ones.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response, could you please clarify if you would like to me to

  1. Replace the entire Apache 2.0 license with the entire BSD-3 clause for the new files?
Copyright <YEAR> <COPYRIGHT HOLDER>

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

OR

  1. Include clause 3 from the BSD license along side the Apache 2.0 license for the new files
    Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every file should have a license header. Currently, we have both, Apache 2.0 and BSD-3-Clause licensed file in our codebase. We strive towards having new contributions licensed under BSD-3-Clause. So, every new file added should have a BSD-3-Clause license header:

// -- BEGIN LICENSE BLOCK ----------------------------------------------
// Copyright 2025 <copyright owner>
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//    * Redistributions of source code must retain the above copyright
//      notice, this list of conditions and the following disclaimer.
//
//    * Redistributions in binary form must reproduce the above copyright
//      notice, this list of conditions and the following disclaimer in the
//      documentation and/or other materials provided with the distribution.
//
//    * Neither the name of the {copyright_holder} nor the names of its
//      contributors may be used to endorse or promote products derived from
//      this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// -- END LICENSE BLOCK ------------------------------------------------

src/primary/robot_message/error_code_message.cpp Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add license headers for new files, preferably BSD-3-Clause ones.

src/primary/primary_client.cpp Outdated Show resolved Hide resolved
src/ur/ur_driver.cpp Outdated Show resolved Hide resolved
tests/test_ur_driver.cpp Show resolved Hide resolved
tests/test_ur_driver.cpp Outdated Show resolved Hide resolved
include/ur_client_library/primary/primary_client.h Outdated Show resolved Hide resolved
include/ur_client_library/primary/primary_client.h Outdated Show resolved Hide resolved
src/primary/primary_client.cpp Outdated Show resolved Hide resolved
src/primary/primary_client.cpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 75.23810% with 26 lines in your changes missing coverage. Please review.

Project coverage is 72.93%. Comparing base (2c12bee) to head (53f4613).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
...clude/ur_client_library/primary/primary_consumer.h 70.73% 11 Missing and 1 partial ⚠️
include/ur_client_library/comm/pipeline.h 16.66% 10 Missing ⚠️
src/primary/primary_client.cpp 86.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
+ Coverage   71.71%   72.93%   +1.21%     
==========================================
  Files          71       79       +8     
  Lines        2786     2978     +192     
  Branches      353      368      +15     
==========================================
+ Hits         1998     2172     +174     
- Misses        596      609      +13     
- Partials      192      197       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Older versions of PolyScope seem to require that.
If URsim's time in the container is running a bit slower than the caller's time, we raise an error.
@urfeex
Copy link
Member

urfeex commented Jan 24, 2025

@jessica-chen-ocado If you could add license headers to the files you've added, I think we would be good to merge this.

Since I've created the file while working at FZI, I left the copyright
owner and the license as is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants