Git Product home page Git Product logo

Comments (12)

saikishor avatar saikishor commented on July 27, 2024 1

@firesurfer Right now we are occupied with the current developments for Jazzy, if we are done with it, I can take a look at this later. I hope this is not a problem 👍

from ros2_control.

firesurfer avatar firesurfer commented on July 27, 2024 1

@saikishor Thanks a lot!

from ros2_control.

saikishor avatar saikishor commented on July 27, 2024

@firesurfer Thank you for taking time and create a new issue. Once you have the testcase, we can try to find a solution. It would be really nice to have such testcase, so we don't introduce the bug in future

from ros2_control.

firesurfer avatar firesurfer commented on July 27, 2024

@saikishor good morning. Could you please point me out where the best place is to add such a test?

I found so far:
https://github.com/ros-controls/ros2_control/blob/master/hardware_interface_testing/test/test_components/test_actuator.cpp

Shall I just add an exclusive actuator there ?

from ros2_control.

saikishor avatar saikishor commented on July 27, 2024

@firesurfer Yes you can add it over there. Can you name it as test_actuator_exclusive_interfaces.cpp because you are focusing on the interfaces part

from ros2_control.

saikishor avatar saikishor commented on July 27, 2024

I went through the code roughly, it is more or less good. Now, the part is to reproduce the same failure you have in the perform command switch in the test :)

from ros2_control.

firesurfer avatar firesurfer commented on July 27, 2024

That should be rather easy. I will add a test controller (prob. here? https://github.com/ros-controls/ros2_control/tree/master/controller_manager/test) that fails during activation and claims some of the interfaces.

from ros2_control.

firesurfer avatar firesurfer commented on July 27, 2024

Regarding the testing procedure:

  1. Setup a system that uses the hardware interface in #1492
  2. Load and activate the controller from #1493

The hw interface should now be in a state in which it has a "started" command interface that has not been stopped.

  1. Try to load and activate the failing controller or another one that uses the command interface.

The hw interface should now deny the prepare_command_mode_switch

from ros2_control.

saikishor avatar saikishor commented on July 27, 2024

@firesurfer add both #1492 and #1483 in the same PR, so you can clearly write a TEST case to reproduce it

from ros2_control.

saikishor avatar saikishor commented on July 27, 2024

@firesurfer
When I meant test, If you can write a test like how the tests are written in the tests folder of the packages, that's why merging both PRs into one would make sense

from ros2_control.

firesurfer avatar firesurfer commented on July 27, 2024

Sorry for that.
But for someone who is not really involved in the ros2control development adding something, especially adding test looks rather difficult/ time consuming at the moment, as there are quite a lot of infrastructure and internal internal interfaces involved. Additionally I couldn't find any documentation about the test infrastructure and best practices.

I am really willing to provide the test code but I could really use some help setting up the necessary glue/infrastructure code.

I merged both PRs in #1492

from ros2_control.

destogl avatar destogl commented on July 27, 2024

@firesurfer In the meantime, you can check how different tests are written. The integration tests are in the hardware_interface_testing package. I usually find a similar test, copy it, and then start changing it. You can add it to any file, and we will easily move it.

from ros2_control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.