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

Remove warning from tests #175

Closed
traversaro opened this issue Aug 2, 2024 · 1 comment · Fixed by #176
Closed

Remove warning from tests #175

traversaro opened this issue Aug 2, 2024 · 1 comment · Fixed by #176

Comments

@traversaro
Copy link
Member

By runnning the ForceTorqueTest, I noticed some warnings:

(gzyarppluginsdev) traversaro@IITBMP014LW012:~/gz-sim-yarp-plugins/build$ ctest -VV -R Force
UpdateCTestConfiguration  from :/home/traversaro/gz-sim-yarp-plugins/build/DartConfiguration.tcl
Parse Config file:/home/traversaro/gz-sim-yarp-plugins/build/DartConfiguration.tcl
UpdateCTestConfiguration  from :/home/traversaro/gz-sim-yarp-plugins/build/DartConfiguration.tcl
Parse Config file:/home/traversaro/gz-sim-yarp-plugins/build/DartConfiguration.tcl
Test project /home/traversaro/gz-sim-yarp-plugins/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: ForceTorqueTest

1: Test command: /home/traversaro/gz-sim-yarp-plugins/build/bin/ForceTorqueTest
1: Working Directory: /home/traversaro/gz-sim-yarp-plugins/build/tests/forcetorque
1: Environment variables:
1:  GZ_SIM_SYSTEM_PLUGIN_PATH=/home/traversaro/gz-sim-yarp-plugins/build/lib
1: Test timeout computed to be: 1500
1: Running main() from /home/conda/feedstock_root/build_artifacts/gtest-split_1722457657850/work/googletest/src/gtest_main.cc
1: [==========] Running 1 test from 1 test suite.
1: [----------] Global test environment set-up.
1: [----------] 1 test from ForceTorqueTest
1: [ RUN      ] ForceTorqueTest.PluginTest
1: [Msg] Loading SDF world file[/home/traversaro/gz-sim-yarp-plugins/tests/forcetorque/model.sdf].
1: [Msg] Serving entity system service on [/entity/system/add]
1: [Dbg] [Physics.cc:860] Loaded [gz::physics::dartsim::Plugin] from library [/home/traversaro/miniforge3/envs/gzyarppluginsdev/lib/gz-physics-7/engine-plugins/libgz-physics-dartsim-plugin.so]
1: [Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::Physics] for entity [1]
1: [Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::ForceTorque] for entity [1]
1: [Msg] Create service on [/world/sensors/create]
1: [Msg] Remove service on [/world/sensors/remove]
1: [Msg] Pose service on [/world/sensors/set_pose]
1: [Msg] Pose service on [/world/sensors/set_pose_vector]
1: [Msg] Light configuration service on [/world/sensors/light_config]
1: [Msg] Physics service on [/world/sensors/set_physics]
1: [Msg] SphericalCoordinates service on [/world/sensors/set_spherical_coordinates]
1: [Msg] Enable collision service on [/world/sensors/enable_collision]
1: [Msg] Disable collision service on [/world/sensors/disable_collision]
1: [Msg] Material service on [/world/sensors/visual_config]
1: [Msg] Material service on [/world/sensors/wheel_slip]
1: [Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::UserCommands] for entity [1]
1: [Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::SceneBroadcaster] for entity [1]
1: [INFO] Yarp configuration string loaded:  (yarpDeviceName forcetorque_plugin_device) (jointName joint_12) (sensorName force_torque_sensor)
1: [INFO] gz-sim-yarp-forcetorque-system: configuration of sensor  force_torque_sensor  loaded
1: [DEBUG] |yarp.dev.PolyDriver|gazebo_forcetorque| Parameters are (device gazebo_forcetorque) (jointName joint_12) (sensorName force_torque_sensor) (sensorScopedName "model/force_torque_model/joint/joint_12/sensor/force_torque_sensor") (sensor_name force_torque_sensor) (yarpDeviceName forcetorque_plugin_device)
1: [INFO] |yarp.dev.PolyDriver|gazebo_forcetorque| Created device <gazebo_forcetorque>. See C++ class ForceTorqueDriver for documentation.
1: [INFO] Registered YARP device with instance name: model/force_torque_model/forcetorque_plugin_device
1: [Dbg] [SystemManager.cc:74] Loaded system [gzyarp::ForceTorque] for entity [8]
1: [WARNING] File specified with a relative path:  ../../../tests/forcetorque/forcetorque_nws.xml , resolved to:  /home/traversaro/gz-sim-yarp-plugins/build/tests/forcetorque/../../../tests/forcetorque/forcetorque_nws.xml . It is recommended to use a URI.
1: [DEBUG] Reading file /home/traversaro/gz-sim-yarp-plugins/build/tests/forcetorque/../../../tests/forcetorque/forcetorque_nws.xml
1: [DEBUG] yarprobotinterface: using xml parser for DTD v3.x
1: [DEBUG] Reading file /home/traversaro/gz-sim-yarp-plugins/build/tests/forcetorque/../../../tests/forcetorque/forcetorque_nws.xml
1: [INFO] Yarprobotinterface was started using the following enable_tags:
1: [INFO] Yarprobotinterface was started using the following disable_tags:
1: [DEBUG] List of all enable attributes found in the include tags:
1: [DEBUG] List of all disable attributes found in the include tags:
1: [DEBUG] Preprocessor complete in:  7.15256e-07 s
1: [INFO] startup phase starting...
1: [INFO] Opening device forcetorque_nws_yarp with parameters [("robotName" = "forcetorque"), ("name" = "/forcetorque"), ("period" = "100")]
1: [DEBUG] |yarp.dev.PolyDriver|forcetorque_nws_yarp| Parameters are (device multipleanalogsensorsserver) (id forcetorque_nws_yarp) (name "/forcetorque") (period 100) (robotName forcetorque)
1: [DEBUG] |yarp.device.multipleanalogsensorsserver| Open complete
1: [INFO] |yarp.dev.PolyDriver|forcetorque_nws_yarp| Created wrapper <multipleanalogsensorsserver>. See C++ class MultipleAnalogSensorsServer for documentation.
1: [INFO] Entering action level 5 of phase startup
1: [INFO] Executing attach action, level 5 on device forcetorque_nws_yarp with parameters [("device" = "forcetorque_plugin_device")]
1: [INFO] forcetorque_nws_yarp is not an IWrapper. Trying IMultipleWrapper
1: [INFO] |yarp.os.Port|/forcetorque/measures:o| Port /forcetorque/measures:o active at tcp://127.0.0.1:10002/
1: [INFO] |yarp.os.Port|/forcetorque/rpc:o| Port /forcetorque/rpc:o active at tcp://127.0.0.1:10003/
1: [DEBUG] |yarp.device.multipleanalogsensorsserver| Attach complete
1: [INFO] All actions for action level 5 of startup phase started. Waiting for unfinished actions.
1: [INFO] All actions for action level 5 of startup phase finished.
1: [INFO] startup phase finished.
1: [Wrn] [TestFixture.cc:208] Fixture has not been finalized, any functions you attemptedto hook into will not be run. It is recommended to call Finalize()before accessing the server.
1: [Dbg] [SystemManager.cc:74] Loaded system [gzyarp::RobotInterface] for entity [8]
1: [Msg] Loaded level [3]
1: [Msg] Serving world controls on [/world/sensors/control], [/world/sensors/control/state] and [/world/sensors/playback/control]
1: [Msg] Serving GUI information on [/world/sensors/gui/info]
1: [Msg] World [sensors] initialized with [1ms] physics profile.
1: [Msg] Serving world SDF generation service on [/world/sensors/generate_world_sdf]
1: [Msg] Serving world names on [/gazebo/worlds]
1: [Msg] Resource path add service on [/gazebo/resource_paths/add].
1: [Msg] Resource path get service on [/gazebo/resource_paths/get].
1: [Msg] Resource path resolve service on [/gazebo/resource_paths/resolve].
1: [Msg] Resource paths published on [/gazebo/resource_paths].
1: [Msg] Server control service on [/server_control].
1: [Msg] Found no publishers on /stats, adding root stats topic
1: [Msg] Found no publishers on /clock, adding root clock topic
1: [Dbg] [SimulationRunner.cc:547] Creating PostUpdate worker threads: 4
1: [Dbg] [SimulationRunner.cc:558] Creating postupdate worker thread (0)
1: [Dbg] [SimulationRunner.cc:558] Creating postupdate worker thread (1)
1: [Dbg] [SimulationRunner.cc:558] Creating postupdate worker thread (2)
1: [Msg] Serving scene information on [/world/sensors/scene/info]
1: [Msg] Serving graph information on [/world/sensors/scene/graph]
1: [Msg] Serving full state on [/world/sensors/state]
1: [Msg] Serving full state (async) on [/world/sensors/state_async]
1: [Msg] Publishing scene information on [/world/sensors/scene/info]
1: [Msg] Publishing entity deletions on [/world/sensors/scene/deletion]
1: [Msg] Publishing state changes on [/world/sensors/state]
1: [Msg] Publishing pose messages on [/world/sensors/pose/info]
1: [Msg] Publishing dynamic pose messages on [/world/sensors/dynamic_pose/info]
1: [Dbg] [ForceTorque.cc:153] Adding JointTransmittedWrench to: 16
1: [DEBUG] |yarp.dev.PolyDriver|multipleanalogsensorsclient| Parameters are (device multipleanalogsensorsclient) (local "/ForceTorqueTest") (remote "/forcetorque") (timeout 1.0)
1: [INFO] |yarp.os.Port|/ForceTorqueTest/rpc:i| Port /ForceTorqueTest/rpc:i active at tcp://127.0.0.1:10004/
1: [INFO] |yarp.os.Port|/ForceTorqueTest/measures:i| Port /ForceTorqueTest/measures:i active at tcp://127.0.0.1:10005/
1: [INFO] |yarp.os.impl.PortCoreInputUnit|/forcetorque/rpc:o| Receiving input from /ForceTorqueTest/rpc:i to /forcetorque/rpc:o using tcp
1: [INFO] |yarp.os.impl.PortCoreOutputUnit|/ForceTorqueTest/rpc:i| Sending output from /ForceTorqueTest/rpc:i to /forcetorque/rpc:o using tcp
1: [INFO] |yarp.os.impl.PortCoreInputUnit|/ForceTorqueTest/measures:i| Receiving input from /forcetorque/measures:o to /ForceTorqueTest/measures:i using tcp
1: [INFO] |yarp.os.impl.PortCoreOutputUnit|/forcetorque/measures:o| Sending output from /forcetorque/measures:o to /ForceTorqueTest/measures:i using tcp
1: [DEBUG] |yarp.device.multipleanalogsensorsclient| Open complete
1: [INFO] |yarp.dev.PolyDriver|multipleanalogsensorsclient| Created device <multipleanalogsensorsclient>. See C++ class MultipleAnalogSensorsClient for documentation.
1: [Wrn] [TestFixture.cc:208] Fixture has not been finalized, any functions you attemptedto hook into will not be run. It is recommended to call Finalize()before accessing the server.
1: [INFO] |yarp.os.impl.PortCoreInputUnit|/ForceTorqueTest/measures:i| Removing input from /forcetorque/measures:o to /ForceTorqueTest/measures:i
1: [INFO] |yarp.os.impl.PortCoreOutputUnit|/forcetorque/measures:o| Removing output from /forcetorque/measures:o to /ForceTorqueTest/measures:i
1: [INFO] |yarp.os.impl.PortCoreInputUnit|/forcetorque/rpc:o| Removing input from /ForceTorqueTest/rpc:i to /forcetorque/rpc:o
1: [INFO] |yarp.os.impl.PortCoreOutputUnit|/ForceTorqueTest/rpc:i| Removing output from /ForceTorqueTest/rpc:i to /forcetorque/rpc:o
1: [DEBUG] |yarp.device.multipleanalogsensorsclient| Close complete
1: [Dbg] [SimulationRunner.cc:574] Exiting postupdate worker thread (00[Dbg] [SimulationRunner.cc:574] )
1: Exiting postupdate worker thread (2)
1:
1: [Dbg] [SimulationRunner.cc:574] Exiting postupdate worker thread (1)
1: [INFO] interrupt1 phase starting...
1: [INFO] interrupt1 phase finished.
1: [INFO] shutdown phase starting...
1: [INFO] Entering action level 5 of phase shutdown
1: [INFO] Executing detach action, level 5 on device forcetorque_nws_yarp with parameters []
1: [DEBUG] |yarp.device.multipleanalogsensorsserver| Detach complete
1: [INFO] All actions for action level 5 of shutdown phase started. Waiting for unfinished actions.
1: [INFO] All actions for action level 5 of shutdown phase finished.
1: [INFO] Closing device forcetorque_nws_yarp
1: [DEBUG] |yarp.device.multipleanalogsensorsserver| Detach complete
1: [DEBUG] |yarp.device.multipleanalogsensorsserver| Close complete
1: [INFO] shutdown phase finished.
1: [       OK ] ForceTorqueTest.PluginTest (4230 ms)
1: [----------] 1 test from ForceTorqueTest (4230 ms total)
1:
1: [----------] Global test environment tear-down
1: [==========] 1 test from 1 test suite ran. (4230 ms total)
1: [  PASSED  ] 1 test.
1/1 Test #1: ForceTorqueTest ..................   Passed    4.26 sec

The following tests passed:
        ForceTorqueTest

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   4.26 sec

In particular the problematic warning is:

1: [WARNING] File specified with a relative path:  ../../../tests/forcetorque/forcetorque_nws.xml , resolved to:  /home/traversaro/gz-sim-yarp-plugins/build/tests/forcetorque/../../../tests/forcetorque/forcetorque_nws.xml . It is recommended to use a URI.

That indeed is probably what is causing the failures in #173 (comment) .

Probably we can set the required env variables appropriately in the tests? Note that we probably also need to cleanup tutorials to ensure that they do not use uri-less yarpRobotInterfaceConfigurationFile arguments, see https://github.com/search?q=repo%3Arobotology%2Fgz-sim-yarp-plugins%20yarpRobotInterfaceConfigurationFile&type=code .

@traversaro
Copy link
Member Author

Related to #174 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants