I want to do some unit testing on a ROS 2 node. On a particular function, the node looks up for a specific transform. If not available, it should throw an exception.
While in other instances I have managed by populating some attributes of the node, I cannot do that for this instance without altering the node’s source code.
The ideal would be to programmatically publish the static transform, inside a test_*.py, and then check the function output to assert it is the expected result, but I have been trying and cannot do it.
Any ideas?
I tried to create some ROS 2 nodes on my tests, but I cannot get them to communicate.
eduardovilasboas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1