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

Add pixi support to build and run IMU test #71

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

martinaxgloria
Copy link
Contributor

@martinaxgloria martinaxgloria commented Mar 4, 2024

As per title, this PR adds the pixi support to the IMU test. In particular, now the dependencies are handled in the pixi.lock file. So now, to run the test, it's possible to simply do:

pixi run imu_test

or imu_sim_test if the test would be run in simulation. In this way, a check on the dependencies is done, and the test is compiled and started.

For the sake of completeness, I'll report here the output of this command on a clean clone of the repo:

✨ Pixi task (default): cmake -S. -B.build -DICUB_TESTS_COMPILES_IMU_TEST=ON
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Found GSL: /usr/include (found version "2.7.1") 
-- Found IPOPT: /usr/lib/libipopt.so;/usr/lib/x86_64-linux-gnu/libdmumps_seq.so;/usr/lib/x86_64-linux-gnu/libblas.so;/usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libblas.so;/usr/lib/x86_64-linux-gnu/libdmumps_seq.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/gcc/x86_64-linux-gnu/11/libgfortran.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/gcc/x86_64-linux-gnu/11/libquadmath.so;/usr/lib/x86_64-linux-gnu/libblas.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.a  
-- Found ICUB 2.4.0 (Components: iCubDev ctrlLib skinDynLib iKin iDyn learningMachine perceptiveModels actionPrimitives optimization)
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found ICUB 2.4.0 (Components: iCubDev ctrlLib skinDynLib iKin iDyn learningMachine perceptiveModels actionPrimitives optimization)
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0")  
-- Found MATIO: /usr/include  
-- Found visit_struct: TRUE  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mgloria/iit/icub-tests/.build

✨ Pixi task (default): cmake --build .build
[  1%] Building CXX object example/cpp/ExampleTest/CMakeFiles/ExampleTest.dir/ExampleTest.cpp.o
[  3%] Linking CXX shared module ../../../plugins/ExampleTest.so
[  3%] Built target ExampleTest
[  5%] Building CXX object example/cpp/ExampleFixture/CMakeFiles/ExampleFixture.dir/ExampleFixture.cpp.o
[  7%] Linking CXX shared module ../../../plugins/ExampleFixture.so
[  7%] Built target ExampleFixture
[  9%] Building CXX object src/camera/CMakeFiles/CameraTest.dir/CameraTest.cpp.o
[ 11%] Linking CXX shared module ../../plugins/CameraTest.so
[ 11%] Built target CameraTest
[ 13%] Building CXX object src/positionDirect/CMakeFiles/PositionDirect.dir/PositionDirect.cpp.o
[ 15%] Linking CXX shared module ../../plugins/PositionDirect.so
[ 15%] Built target PositionDirect
[ 17%] Building CXX object src/positionControl-accuracy/CMakeFiles/PositionControlAccuracy.dir/PositionControlAccuracy.cpp.o
[ 19%] Linking CXX shared module ../../plugins/PositionControlAccuracy.so
[ 19%] Built target PositionControlAccuracy
[ 21%] Building CXX object src/positionControl-accuracy-ExternalPid/CMakeFiles/PositionControlAccuracyExternalPid.dir/PositionControlAccuracyExternalPid.cpp.o
[ 23%] Linking CXX shared module ../../plugins/PositionControlAccuracyExternalPid.so
[ 23%] Built target PositionControlAccuracyExternalPid
[ 25%] Building CXX object src/openloop-consistency/CMakeFiles/OpenloopConsistency.dir/OpenloopConsistency.cpp.o
[ 26%] Linking CXX shared module ../../plugins/OpenloopConsistency.so
[ 26%] Built target OpenloopConsistency
[ 28%] Building CXX object src/torqueControl-consistency/CMakeFiles/TorqueControlConsistency.dir/TorqueControlConsistency.cpp.o
[ 30%] Linking CXX shared module ../../plugins/TorqueControlConsistency.so
[ 30%] Built target TorqueControlConsistency
[ 32%] Building CXX object src/torqueControl-stiffDampCheck/CMakeFiles/TorqueControlStiffDampCheck.dir/TorqueControlStiffDampCheck.cpp.o
[ 34%] Linking CXX shared module ../../plugins/TorqueControlStiffDampCheck.so
[ 34%] Built target TorqueControlStiffDampCheck
[ 36%] Building CXX object src/cartesian-control/simple-p2p-movement/CMakeFiles/CartesianControlSimpleP2pMovementTest.dir/CartesianControlSimpleP2pMovementTest.cpp.o
[ 38%] Linking CXX shared module ../../../plugins/CartesianControlSimpleP2pMovementTest.so
[ 38%] Built target CartesianControlSimpleP2pMovementTest
[ 40%] Building CXX object src/cartesian-control/reaching-tolerance/CMakeFiles/CartesianControlReachingToleranceTest.dir/CartesianControlReachingToleranceTest.cpp.o
[ 42%] Linking CXX shared module ../../../plugins/CartesianControlReachingToleranceTest.so
[ 42%] Built target CartesianControlReachingToleranceTest
[ 44%] Building CXX object src/gaze-control/simple-look/CMakeFiles/GazeControlSimpleLookTest.dir/GazeControlSimpleLookTest.cpp.o
[ 46%] Linking CXX shared module ../../../plugins/GazeControlSimpleLookTest.so
[ 46%] Built target GazeControlSimpleLookTest
[ 48%] Building CXX object src/motorEncoders-consistency/CMakeFiles/MotorEncodersConsistency.dir/motorEncodersConsistency.cpp.o
[ 50%] Linking CXX shared module ../../plugins/MotorEncodersConsistency.so
[ 50%] Built target MotorEncodersConsistency
[ 51%] Building CXX object src/opticalEncoders-drift/CMakeFiles/OpticalEncodersDrift.dir/opticalEncodersDrift.cpp.o
[ 53%] Linking CXX shared module ../../plugins/OpticalEncodersDrift.so
[ 53%] Built target OpticalEncodersDrift
[ 55%] Building CXX object src/motorEncodersSignCheck/CMakeFiles/MotorEncodersSignCheck.dir/motorEncodersSignCheck.cpp.o
[ 57%] Linking CXX shared module ../../plugins/MotorEncodersSignCheck.so
[ 57%] Built target MotorEncodersSignCheck
[ 59%] Building CXX object src/models-consistency/CMakeFiles/iKiniDynConsistencyTest.dir/iKiniDynConsistencyTest.cpp.o
[ 61%] Linking CXX shared module ../../plugins/iKiniDynConsistencyTest.so
[ 61%] Built target iKiniDynConsistencyTest
[ 63%] Building CXX object src/demoRedBall/CMakeFiles/DemoRedBallTest.dir/DemoRedBallTest.cpp.o
[ 65%] Linking CXX shared module ../../plugins/DemoRedBallTest.so
[ 65%] Built target DemoRedBallTest
[ 67%] Building CXX object src/motor-tests/CMakeFiles/MotorTest.dir/MotorTest.cpp.o
[ 69%] Linking CXX shared module ../../plugins/MotorTest.so
[ 69%] Built target MotorTest
[ 71%] Building CXX object src/jointLimits/CMakeFiles/JointLimits.dir/jointLimits.cpp.o
[ 73%] Linking CXX shared module ../../plugins/JointLimits.so
[ 73%] Built target JointLimits
[ 75%] Building CXX object src/motor-stiction/CMakeFiles/MotorStiction.dir/MotorStiction.cpp.o
[ 76%] Linking CXX shared module ../../plugins/MotorStiction.so
[ 76%] Built target MotorStiction
[ 78%] Building CXX object src/ftsensor-tests/CMakeFiles/FtSensorTest.dir/FtSensorTest.cpp.o
[ 80%] Linking CXX shared module ../../plugins/FtSensorTest.so
[ 80%] Built target FtSensorTest
[ 82%] Building CXX object src/controlModes/CMakeFiles/ControlModes.dir/ControlModes.cpp.o
[ 84%] Linking CXX shared module ../../plugins/ControlModes.so
[ 84%] Built target ControlModes
[ 86%] Building CXX object src/ports-frequency/CMakeFiles/PortsFrequency.dir/PortsFrequency.cpp.o
[ 88%] Linking CXX shared module ../../plugins/PortsFrequency.so
[ 88%] Built target PortsFrequency
[ 90%] Building CXX object src/movementReferencesTest/CMakeFiles/movementReferencesTest.dir/movementReferencesTest.cpp.o
[ 92%] Linking CXX shared module ../../plugins/movementReferencesTest.so
[ 92%] Built target movementReferencesTest
[ 94%] Building CXX object src/skinWrapperTest/CMakeFiles/SkinWrapperTest.dir/SkinWrapperTest.cpp.o
[ 96%] Linking CXX shared module ../../plugins/SkinWrapperTest.so
[ 96%] Built target SkinWrapperTest
[ 98%] Building CXX object src/imu/CMakeFiles/imu.dir/imu.cpp.o
[100%] Linking CXX shared module ../../plugins/imu.so
[100%] Built target imu

✨ Pixi task (default): robottestingframework-testrunner --verbose --suite suites/imu-icubGazeboSim.xml
Loading suites/imu-icubGazeboSim.xml
Starting test runner.
Test suite IMU sensor test started...
[INFO]  (IMU sensor test) reports: yarpmanager is setting up the fixture...
Test case Imu started...
[INFO]  (Imu) reports: Loading configuration from /home/mgloria/iit/icub-tests/suites/contexts/icub/test_imu.ini
[INFO]  (Imu) reports: Running IMU test on icubSim...
[DEBUG] |yarp.dev.PolyDriver|remotecontrolboardremapper| Parameters are (axesNames (torso_pitch torso_roll torso_yaw neck_pitch neck_roll neck_yaw l_shoulder_pitch l_shoulder_roll l_shoulder_yaw r_shoulder_pitch r_shoulder_roll r_shoulder_yaw)) (device remotecontrolboardremapper) (localPortPrefix "/test") (remoteControlBoards ("/icubSim/torso" "/icubSim/head" "/icubSim/left_arm" "/icubSim/right_arm"))
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/test/icubSim/torso") (remote "/icubSim/torso")
[INFO] |yarp.os.Port|/test/icubSim/torso/rpc:o| Port /test/icubSim/torso/rpc:o active at tcp://10.240.78.118:10097/
[INFO] |yarp.os.Port|/test/icubSim/torso/command:o| Port /test/icubSim/torso/command:o active at tcp://10.240.78.118:10098/
[INFO] |yarp.os.Port|/test/icubSim/torso/stateExt:i| Port /test/icubSim/torso/stateExt:i active at tcp://10.240.78.118:10099/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/torso/rpc:o| Sending output from /test/icubSim/torso/rpc:o to /icubSim/torso/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/torso/command:o| Sending output from /test/icubSim/torso/command:o to /icubSim/torso/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/torso/stateExt:i| Receiving input from /icubSim/torso/stateExt:o to /test/icubSim/torso/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/test/icubSim/head") (remote "/icubSim/head")
[INFO] |yarp.os.Port|/test/icubSim/head/rpc:o| Port /test/icubSim/head/rpc:o active at tcp://10.240.78.118:10100/
[INFO] |yarp.os.Port|/test/icubSim/head/command:o| Port /test/icubSim/head/command:o active at tcp://10.240.78.118:10101/
[INFO] |yarp.os.Port|/test/icubSim/head/stateExt:i| Port /test/icubSim/head/stateExt:i active at tcp://10.240.78.118:10102/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/head/rpc:o| Sending output from /test/icubSim/head/rpc:o to /icubSim/head/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/head/command:o| Sending output from /test/icubSim/head/command:o to /icubSim/head/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/head/stateExt:i| Receiving input from /icubSim/head/stateExt:o to /test/icubSim/head/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/test/icubSim/left_arm") (remote "/icubSim/left_arm")
[INFO] |yarp.os.Port|/test/icubSim/left_arm/rpc:o| Port /test/icubSim/left_arm/rpc:o active at tcp://10.240.78.118:10103/
[INFO] |yarp.os.Port|/test/icubSim/left_arm/command:o| Port /test/icubSim/left_arm/command:o active at tcp://10.240.78.118:10104/
[INFO] |yarp.os.Port|/test/icubSim/left_arm/stateExt:i| Port /test/icubSim/left_arm/stateExt:i active at tcp://10.240.78.118:10105/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/left_arm/rpc:o| Sending output from /test/icubSim/left_arm/rpc:o to /icubSim/left_arm/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/left_arm/command:o| Sending output from /test/icubSim/left_arm/command:o to /icubSim/left_arm/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/left_arm/stateExt:i| Receiving input from /icubSim/left_arm/stateExt:o to /test/icubSim/left_arm/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/test/icubSim/right_arm") (remote "/icubSim/right_arm")
[INFO] |yarp.os.Port|/test/icubSim/right_arm/rpc:o| Port /test/icubSim/right_arm/rpc:o active at tcp://10.240.78.118:10106/
[INFO] |yarp.os.Port|/test/icubSim/right_arm/command:o| Port /test/icubSim/right_arm/command:o active at tcp://10.240.78.118:10107/
[INFO] |yarp.os.Port|/test/icubSim/right_arm/stateExt:i| Port /test/icubSim/right_arm/stateExt:i active at tcp://10.240.78.118:10108/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/right_arm/rpc:o| Sending output from /test/icubSim/right_arm/rpc:o to /icubSim/right_arm/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/right_arm/command:o| Sending output from /test/icubSim/right_arm/command:o to /icubSim/right_arm/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/right_arm/stateExt:i| Receiving input from /icubSim/right_arm/stateExt:o to /test/icubSim/right_arm/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO] |yarp.dev.PolyDriver|remotecontrolboardremapper| Created device <remotecontrolboardremapper>. See C++ class RemoteControlBoardRemapper for documentation.
[DEBUG] |yarp.dev.PolyDriver|multipleanalogsensorsclient| Parameters are (device multipleanalogsensorsclient) (local "/imuTest/icubSim/alljoints/inertials") (remote "/icubSim/alljoints/inertials")
[INFO] |yarp.os.Port|/imuTest/icubSim/alljoints/inertials/rpc:i| Port /imuTest/icubSim/alljoints/inertials/rpc:i active at tcp://10.240.78.118:10109/
[INFO] |yarp.os.Port|/imuTest/icubSim/alljoints/inertials/measures:i| Port /imuTest/icubSim/alljoints/inertials/measures:i active at tcp://10.240.78.118:10110/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/imuTest/icubSim/alljoints/inertials/rpc:i| Sending output from /imuTest/icubSim/alljoints/inertials/rpc:i to /icubSim/alljoints/inertials/rpc:o using tcp
[INFO] |yarp.os.impl.PortCoreInputUnit|/imuTest/icubSim/alljoints/inertials/measures:i| Receiving input from /icubSim/alljoints/inertials/measures:o to /imuTest/icubSim/alljoints/inertials/measures:i using tcp
[DEBUG] |yarp.device.multipleanalogsensorsclient| Open complete
[INFO] |yarp.dev.PolyDriver|multipleanalogsensorsclient| Created device <multipleanalogsensorsclient>. See C++ class MultipleAnalogSensorsClient for documentation.
[INFO]  (Imu) reports: Testing all the IMUs available...
[DEBUG] |yarp.dev.PolyDriver|multipleanalogsensorsremapper| Parameters are (OrientationSensorsNames (l_arm_ft r_arm_ft head_imu_0)) (device multipleanalogsensorsremapper)
[INFO] |yarp.dev.PolyDriver|multipleanalogsensorsremapper| Created device <multipleanalogsensorsremapper>. See C++ class MultipleAnalogSensorsRemapper for documentation.
[INFO] |yarp.os.Port|/test-imu/out| Port /test-imu/out active at tcp://10.240.78.118:10113/
[INFO]  (Imu) reports: Opening port /test-imu/out...
[INFO]  (Imu) reports: Starting reading IMU orientation values...
[INFO]  (Imu) checks: Testing sensor l_arm_ft: the max rotation angle error is 0.012059 rad!
[INFO]  (Imu) checks: Testing sensor r_arm_ft: the max rotation angle error is 0.011657 rad!
[INFO]  (Imu) checks: Testing sensor head_imu_0: the max rotation angle error is 0.006650 rad!
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/torso/rpc:o| Removing output from /test/icubSim/torso/rpc:o to /icubSim/torso/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/torso/command:o| output for route /test/icubSim/torso/command:o->udp->/icubSim/torso/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/torso/command:o| Removing output from /test/icubSim/torso/command:o to /icubSim/torso/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/torso/stateExt:i| Removing input from /icubSim/torso/stateExt:o to /test/icubSim/torso/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/head/rpc:o| Removing output from /test/icubSim/head/rpc:o to /icubSim/head/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/head/command:o| output for route /test/icubSim/head/command:o->udp->/icubSim/head/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/head/command:o| Removing output from /test/icubSim/head/command:o to /icubSim/head/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/head/stateExt:i| Removing input from /icubSim/head/stateExt:o to /test/icubSim/head/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/left_arm/rpc:o| Removing output from /test/icubSim/left_arm/rpc:o to /icubSim/left_arm/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/left_arm/command:o| output for route /test/icubSim/left_arm/command:o->udp->/icubSim/left_arm/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/left_arm/command:o| Removing output from /test/icubSim/left_arm/command:o to /icubSim/left_arm/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/left_arm/stateExt:i| Removing input from /icubSim/left_arm/stateExt:o to /test/icubSim/left_arm/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/right_arm/rpc:o| Removing output from /test/icubSim/right_arm/rpc:o to /icubSim/right_arm/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/right_arm/command:o| output for route /test/icubSim/right_arm/command:o->udp->/icubSim/right_arm/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/icubSim/right_arm/command:o| Removing output from /test/icubSim/right_arm/command:o to /icubSim/right_arm/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/test/icubSim/right_arm/stateExt:i| Removing input from /icubSim/right_arm/stateExt:o to /test/icubSim/right_arm/stateExt:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/imuTest/icubSim/alljoints/inertials/measures:i| Removing input from /icubSim/alljoints/inertials/measures:o to /imuTest/icubSim/alljoints/inertials/measures:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/imuTest/icubSim/alljoints/inertials/rpc:i| Removing output from /imuTest/icubSim/alljoints/inertials/rpc:i to /icubSim/alljoints/inertials/rpc:o
[DEBUG] |yarp.device.multipleanalogsensorsclient| Close complete
Test case Imu passed!
[INFO]  (IMU sensor test) reports: yarpmanager is tearing down the fixture...
Test suite IMU sensor test passed!
Ending test runner.

---------- results -----------
Total number of test suites  : 1
Number of passed test suites : 1
Number of failed test suites : 0
Total number of test cases   : 1
Number of passed test cases  : 1
Number of failed test cases  : 0

@martinaxgloria martinaxgloria self-assigned this Mar 4, 2024
@martinaxgloria martinaxgloria changed the title Pixi support Add pixi support to build and run IMU test Mar 4, 2024
pixi.toml Outdated
Comment on lines 16 to 19
robometry = ">=1.2.3,<1.3"
idyntree = ">=10.3.0,<10.4"
yarp = ">=3.9.0,<3.10"
robot-testing-framework = ">=2.0.1,<2.1"
Copy link
Member

Choose a reason for hiding this comment

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

Just a comment: I know that this is default behavior of pixi add (xref: prefix-dev/pixi#639), but I am not sure if this matches what it would be convenient for us. In particular, I guess that that we want to always use recent version of dependencies when we refresh the lock file. Could it make sense for this reason to switch this constraints to be = "*"?

Copy link
Member

@traversaro traversaro Mar 4, 2024

Choose a reason for hiding this comment

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

Anyhow, this is totally not blocking.

Copy link
Member

Choose a reason for hiding this comment

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

(Note: I edited the previous comment, that was quite rude due to a typo, sorry about that).

pixi.toml Outdated
Comment on lines 10 to 11
build_imu_test = {cmd = "cmake -S. -B.build -DICUB_TESTS_COMPILES_IMU_TEST=ON"}
compile_imu_test = {cmd = "cmake --build .build", depends_on = ["build_imu_test"]}
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that this works? If you are not installing the repo, how does the robottestingframework-testrunner find the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, obviously this doesn't work if robottestingframework is not installed. In this case, to install the dependencies it would be sufficient to clone and compile them as one or multiple pixi tasks?

Copy link
Member

Choose a reason for hiding this comment

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

Actually robottestingframework-testrunner will work fine (it is installed by the robot-testing-framework package, see https://conda-metadata-app.streamlit.app/?q=conda-forge%2Flinux-64%2Frobot-testing-framework-2.0.1-hcb278e6_1.conda), what is missing is that you need to install the icub-tests, or let somehow know to RTF how to load the plugins compiled by this project. If I recall correctly, you need to do this by setting some env variable, see https://github.com/robotology/robotology-superbuild/blob/0215a26481e12fb2c46acf54492c2852c88a8e35/doc/environment-variables-configuration.md?plain=1#L29 .

@traversaro
Copy link
Member

-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")

Unfortunatly we have a problem similar to prefix-dev/pixi#826, i.e. if you are running pixi in a shell in which you have a setup.sh sourced (for example the one of a ros installation, or of a robotology-superbuild one), we have cross talking. The proper solution for this is for pixi to run in a isolated environment (see prefix-dev/pixi#289), possibily with some whitelisted env variables, but for the time being we could either document to avoid the source of the setup.sh of the superbuild if pixi is used, or other workarounds to avoid cross-talking?

src/imu/imu.h Outdated
Comment on lines 23 to 26
* You can manually modify the suites/contexts/icub/test_imu.ini file depending on the parameters of the test. In this case, after compiling, you can run:
* You can find the parameters involved in the test in suites/contexts/icub/test_imu.ini file.
* To run the test, you have to install <a href="https://pixi.sh/latest/#installation">pixi</a> and then, after cloning this repo, you can run:
*
* Example: robottestingframework-testrunner --suite ../suites/imu.xml
* pixi run imu_test
Copy link
Member

Choose a reason for hiding this comment

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

I would still leave the documentation on how to run the tests without pixi. For example, on the robot setup with the robotology-superbuild installed, somebody would may want to run the test using the versions installed via icub-tests, without the need to manually download the repo. There may other reason for which a user may not want to use pixi, so I think it make sense to leave the general documentation, and the pixi (also to avoid a lock-in on pixi).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, maybe we could add a README.md in which we could list the two possible installation and usage procedures. In the doxygen doc, instead, we'll keep the "traditional" one, i.e. without pixi

@@ -18,13 +18,14 @@
*
* The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements.
* It takes as input the urdf of the robot and make a comparison between the expected values retrieved from the forward kinematics and the ones read from the IMU itself.
* The test involves the movements of the joints belonging to the part on which the sensor is mounted. The movements are executed sequentially, traversing from the home position to the lower limit, upper limit and back to the home position for each joint.
* The test involves the movements of the joints belonging to the part on which the sensors are mounted.
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the configuration file https://github.com/robotology/icub-tests/blob/devel/suites/contexts/icub/test_imu.ini#L3, it seems that the test requires the existence of the multipleanalogsensorsserver with prefix /${robotname}/alljoints/inertials . Which robots expose this functionality? It could make sense to either list the robots that expose this functionality, or if that is too complicated from the maintenance point of view, just explicitly mention that the robot needs to expose a multipleanalogsensorsserver device with prefix /${robotname}/alljoints/inertials in its yarprobotinterface config files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So far, no robots exposed this functionality upstream but I'm going to do this at least for iCubGenova11 and for iCubGazeboV2_* models I guess. We could use them as references to highlight in the documentation that is mandatory to have this MASserver exposed with that port name. Thanks @traversaro!

@martinaxgloria
Copy link
Contributor Author

Hi @traversaro, thank you for the review! I'm going to address each comment at a time

@martinaxgloria
Copy link
Contributor Author

-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YCM: /home/mgloria/iit/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.1-20230913+gita077719")
-- Found YARP: /home/mgloria/iit/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.9.0")

Unfortunatly we have a problem similar to prefix-dev/pixi#826, i.e. if you are running pixi in a shell in which you have a setup.sh sourced (for example the one of a ros installation, or of a robotology-superbuild one), we have cross talking. The proper solution for this is for pixi to run in a isolated environment (see prefix-dev/pixi#289), possibily with some whitelisted env variables, but for the time being we could either document to avoid the source of the setup.sh of the superbuild if pixi is used, or other workarounds to avoid cross-talking?

In 736e4f4 I added a sh file in which I set some env variables that usually, if I remember well, are set when the robotology setup.sh is sourced in the bashrc. In this way, for what concerns YARP_DATA_DIRS, CMAKE_INSTALL_PREFIX and LD_LIBRARY_PATH we should not have any cross-talking when working inside the pixi environment (I'm newbie, so if I'm writing something wrong, please let me know, I'm just reporting what I understood about pixi usage). For example:

echo $YARP_DATA_DIRS
/home/mgloria/iit/robotology-superbuild/build/install/share/yarp:/home/mgloria/iit/robotology-superbuild/build/install/share/iCub:/home/mgloria/iit/robotology-superbuild/build/install/share/ICUBcontrib:/home/mgloria/iit/robotology-superbuild/build/install/share/ergoCub:/home/mgloria/iit/robotology-superbuild/src/icub-tests/suites:/home/mgloria/iit/icub-tests/suites

while:

pixi r echo \$YARP_DATA_DIRS
/home/mgloria/iit/icub-tests/.pixi/envs/default/share/yarp:/home/mgloria/iit/icub-tests/.pixi/envs/default/share/iCub:/home/mgloria/iit/icub-tests/suites

If other env variables could get involved in our case, could we use the same strategy used in robotology/icub-models-generator#263 and set them to empty?

cc @traversaro @Nicogene

@traversaro
Copy link
Member

Cool, great! Can you share the output after those improvements?

@martinaxgloria
Copy link
Contributor Author

Cool, great! Can you share the output after those improvements?

Actually, the output is not the expected one. I'll try to explain the problem.
In the set_path.sh I set those env variables:

export CMAKE_INSTALL_PREFIX=$CONDA_PREFIX
export YARP_DATA_DIRS=$CMAKE_INSTALL_PREFIX/share/yarp:$CMAKE_INSTALL_PREFIX/share/iCub:$PIXI_PROJECT_ROOT/suites
export LD_LIBRARY_PATH=$CMAKE_INSTALL_PREFIX/lib/robottestingframework:$PIXI_PROJECT_ROOT/.build/plugins

Trying to launch the test with pixi run imu_sim_test on my WSL2 on which no robotology-superbuild is installed I obtained:

wsl-image

and the test starts despite the warning.

Then I repeated the procedure on my Linux machine in which instead the superbuild is installed and the setup.sh is sourced in the bashrc and this time I had:

image

In this sense, I removed the source of the robotology-superbuild from the bashrc and I did pixi install and pixi run imu_sim_test again, obtaining the same result of the WSL2 environment. But if I add again the setup.sh source, pixi run searches for the installation in the robotology-superbuild install directory. I tried to print out $PATH within and out of the pixi env:

  • within pixi:

     pixi r echo $\PATH
     /home/mgloria/iit/icub-tests/.pixi/envs/default/bin:/home/mgloria/anaconda3/condabin:/opt/rti.com/rti_connext_dds-6.0.1/lib/		x64Linux4gcc7.3.0:/opt/rti.com/rti_connext_dds-6.0.1/bin:/opt/ros/humble/bin:/home/mgloria/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/mgloria/iit/robotology-superbuild/build/install/bin:/home/mgloria/iit/robotology-superbuild/build/install/lib/python3/dist-packages/bin:/home/mgloria/.pixi/bin:/home/mgloria/iit/icub-tests/.pixi/envs/default/bin
    
  • out of pixi:

     /home/mgloria/anaconda3/condabin:/opt/rti.com/rti_connext_dds-6.0.1/lib/x64Linux4gcc7.3.0:/opt/rti.com/rti_connext_dds-6.0.1/bin:/opt/ros/humble/bin:/home/mgloria/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/mgloria/iit/robotology-superbuild/build/install/bin:/home/mgloria/iit/robotology-superbuild/build/install/lib/python3/dist-packages/bin:/home/mgloria/.pixi/bin
    

As you can see, the /home/mgloria/iit/icub-tests/.pixi/envs/default/bin is prepended to the $PATH env, so it should take precedence to the /home/mgloria/iit/robotology-superbuild/build/install/bin but it seems that it doesn't.

It seems that the only way to work in a clean pixi environment is to avoid the source of the robotology-superbuild setup.sh

cc @traversaro @Nicogene

@traversaro
Copy link
Member

Can you run pixi run env, to understand which env variables are set?

@martinaxgloria
Copy link
Contributor Author

martinaxgloria commented Mar 6, 2024

Can you run pixi run env, to understand which env variables are set?

Here you are:

pixi run env
AMENT_PREFIX_PATH=/opt/ros/humble:/home/mgloria/iit/robotology-superbuild/build/install
AS2_GZ_ASSETS_SCRIPT_PATH=/opt/ros/humble/share/as2_gazebo_classic_assets/scripts
BLOCKFACTORY_PLUGIN_PATH=/home/mgloria/iit/robotology-superbuild/build/install/lib/blockfactory
BLOCKTEST_RESOURCE_PATH=/home/mgloria/iit/robotology-superbuild/build/install/bin
CMAKE_INSTALL_PREFIX=/home/mgloria/iit/icub-tests/.pixi/envs/default
CMAKE_PREFIX_PATH=/home/mgloria/iit/robotology-superbuild/build/install
COLORTERM=truecolor
CONDA_DEFAULT_ENV=icub-tests
CONDA_EXE=/home/mgloria/anaconda3/bin/conda
CONDA_PREFIX=/home/mgloria/iit/icub-tests/.pixi/envs/default
CONDA_PYTHON_EXE=/home/mgloria/anaconda3/bin/python
CONDA_SHLVL=0
CONNEXTDDS_ARCH=x64Linux4gcc7.3.0
CONNEXTDDS_DIR=/opt/rti.com/rti_connext_dds-6.0.1
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=ubuntu
DISPLAY=:1
GAZEBO_MASTER_URI=http://localhost:11345
GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org
GAZEBO_MODEL_PATH=/opt/ros/humble/share/as2_gazebo_classic_assets/models:/usr/share/gazebo-11/models::/home/mgloria/iit/robotology-superbuild/build/install/share/gazebo/models:/home/mgloria/iit/robotology-superbuild/build/install/share/iCub/robots:/home/mgloria/iit/robotology-superbuild/build/install/share:/home/mgloria/iit/robotology-superbuild/build/install/share/ergoCub/robots:/home/mgloria/iit/robotology-superbuild/build/install/share/ergoCub/robots
GAZEBO_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/gazebo-11/plugins::/home/mgloria/iit/robotology-superbuild/build/install/lib
GAZEBO_RESOURCE_PATH=/opt/ros/humble/share/as2_gazebo_classic_assets/worlds:/usr/share/gazebo-11::/home/mgloria/iit/robotology-superbuild/build/install/share/gazebo/worlds
GDMSESSION=ubuntu
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/terminator.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=10533
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GNOME_SHELL_SESSION_MODE=ubuntu
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GSETTINGS_SCHEMA_DIR=/home/mgloria/iit/icub-tests/.pixi/envs/default/share/glib-2.0/schemas
GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
GTK_IM_MODULE=ibus
GTK_MODULES=gail:atk-bridge
GURUMDDS_HOME=/usr/share/gurumdds/cmake/../../..
HOME=/home/mgloria
IBUS_DISABLE_SNOOPER=1
INVOCATION_ID=cbaad0950ff9463cabcc76b4b4460930
JOURNAL_STREAM=8:41934
LANG=en_US.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_ALL=en_US.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
LD_LIBRARY_PATH=/home/mgloria/iit/icub-tests/.pixi/envs/default/lib/robottestingframework:/home/mgloria/iit/icub-tests/.build/plugins:/home/mgloria/iit/icub-tests/.pixi/envs/default/bin
LESSCLOSE=/usr/bin/lesspipe %s %s
LESSOPEN=| /usr/bin/lesspipe %s
LOGNAME=mgloria
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
MANAGERPID=2394
NDDSHOME=/opt/rti.com/rti_connext_dds-6.0.1
OGRE_RESOURCE_PATH=/usr/lib/x86_64-linux-gnu/OGRE-1.9.0
OLDPWD=/home/mgloria/iit/icub-tests
PATH=/home/mgloria/iit/icub-tests/.pixi/envs/default/bin:/home/mgloria/anaconda3/condabin:/opt/rti.com/rti_connext_dds-6.0.1/lib/x64Linux4gcc7.3.0:/opt/rti.com/rti_connext_dds-6.0.1/bin:/opt/ros/humble/bin:/home/mgloria/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/mgloria/iit/robotology-superbuild/build/install/bin:/home/mgloria/iit/robotology-superbuild/build/install/lib/python3/dist-packages/bin:/home/mgloria/.pixi/bin:/home/mgloria/iit/icub-tests/.pixi/envs/default/bin
PIXI_ENVIRONMENT_NAME=default
PIXI_ENVIRONMENT_PLATFORMS=linux-64,win-64,osx-64
PIXI_PROJECT_MANIFEST=/home/mgloria/iit/icub-tests/pixi.toml
PIXI_PROJECT_NAME=icub-tests
PIXI_PROJECT_ROOT=/home/mgloria/iit/icub-tests
PIXI_PROJECT_VERSION=0.0.0
PIXI_PROMPT=(icub-tests) 
PWD=/home/mgloria/iit/icub-tests/build
PYTHONPATH=/opt/ros/humble/lib/python/site-packages:/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages:/home/mgloria/iit/robotology-superbuild/build/install/lib/python3/dist-packages
QT_ACCESSIBILITY=1
QT_IM_MODULE=ibus
RCUTILS_COLORIZED_OUTPUT=1
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ROBOTOLOGY_SUPERBUILD_INSTALL_PREFIX=/home/mgloria/iit/robotology-superbuild/build/install
ROBOTOLOGY_SUPERBUILD_SOURCE_DIR=/home/mgloria/iit/robotology-superbuild
ROS_DISTRO=humble
ROS_LOCALHOST_ONLY=0
ROS_PACKAGE_PATH=/home/mgloria/iit/robotology-superbuild/build/install/share
ROS_PYTHON_VERSION=3
ROS_VERSION=2
SESSION_MANAGER=local/iiticb002lw003:@/tmp/.ICE-unix/3169,unix/iiticb002lw003:/tmp/.ICE-unix/3169
SHELL=/bin/bash
SHLVL=1
SSH_AGENT_LAUNCHER=gnome-keyring
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
SYSTEMD_EXEC_PID=3239
TERM=xterm-256color
TERMINATOR_DBUS_NAME=net.tenshu.Terminator23558193cd9818af7fe4d2c2f5bd9d00f
TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2
TERMINATOR_UUID=urn:uuid:0d76b98a-aa7e-4042-9a78-4449442cf7c4
USER=mgloria
USERNAME=mgloria
VTE_VERSION=6800
WINDOWPATH=2
XAUTHORITY=/run/user/1000/gdm/Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_CURRENT_DESKTOP=ubuntu:GNOME
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop:/home/mgloria/iit/robotology-superbuild/build/install/share:/home/mgloria/iit/icub-tests/.pixi/envs/default/share
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=x11
XML_CATALOG_FILES=file:///home/mgloria/iit/icub-tests/.pixi/envs/default/etc/xml/catalog file:///etc/xml/catalog
XMODIFIERS=@im=ibus
YARP_COLORED_OUTPUT=1
YARP_DATA_DIRS=/home/mgloria/iit/icub-tests/.pixi/envs/default/share/yarp:/home/mgloria/iit/icub-tests/.pixi/envs/default/share/iCub:/home/mgloria/iit/icub-tests/suites
_=/home/mgloria/.pixi/bin/pixi
_CE_CONDA=
_CE_M=
robometry_DIR=/home/mgloria/robotology-superbuild/build/install

cc @traversaro

@traversaro
Copy link
Member

Click to read an OT, not really related to this PR

OT: I totally agree in trying to robustify the pixi activate (at least until we have prefix-dev/pixi#289) a general comment anyhow I would treat the robotology-superbuild's setup.sh and ROS setup.sh exactly as conda or venv environments, and suggest users not to activate them by default. I know this is not what we did in the past, but sometimes when time passes you realize that some stuff can change. However, activating stuff manually is indeed not really convenient, so probably we can also document how to add new "terminal profiles" that permit to create a new vanilla terminal, or a new terminal with robotology-superbuild sources, or a new terminal with a conda/pixi environment with just a click. For example, on Windows terminal this can be done with:

addnewprofile

but similar functionality exists also for most macOS or Linux applications. Things are more complex on the robot, but eventually we could think of something also for that.

@martinaxgloria
Copy link
Contributor Author

However, activating stuff manually is indeed not really convenient, so probably we can also document how to add new "terminal profiles" that permit to create a new vanilla terminal, or a new terminal with robotology-superbuild sources, or a new terminal with a conda/pixi environment with just a click.

I agree. So, for the time being we will go with avoiding the automatic activation of the robotology-superbuild setup.sh (and we document it) for not having cross-talking problems.

@martinaxgloria
Copy link
Contributor Author

Thanks to the help of @traversaro, in 180cc4a I prepended the $CONDA_PREFIX to the $CMAKE_PREFIX_PATH env variable. In this way, it's not necessary to remove the source of the robotology-superbuild setup.sh from the bashrc:

✨ Pixi task (default): cmake -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX -S. -B.build -DICUB_TESTS_COMPILES_IMU_TEST=ON
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YARP: /home/mgloria/iit/icub-tests/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YARP: /home/mgloria/iit/icub-tests/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YARP: /home/mgloria/iit/icub-tests/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YARP: /home/mgloria/iit/icub-tests/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Found ICUB 2.5.0 (Components: iCubDev ctrlLib skinDynLib iKin iDyn learningMachine perceptiveModels actionPrimitives optimization)
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YCM: /home/mgloria/iit/icub-tests/.pixi/envs/default/share/cmake/YCM (found version "0.16.2")
-- Found YARP: /home/mgloria/iit/icub-tests/.pixi/envs/default/lib/cmake/YARP (found version "3.9.0~dev")
-- Found ICUB 2.5.0 (Components: iCubDev ctrlLib skinDynLib iKin iDyn learningMachine perceptiveModels actionPrimitives optimization)
-- Configuring done

cc @Nicogene

@traversaro
Copy link
Member

I think we can also just set CMAKE_PREFIX_PATH to $CONDA_PREFIX instead of prepending, anyhow both should work fine in this case.

Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

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

Ok for me, for the pixi part I leave the review to @traversaro. The documentation can be refined later on when we will explain this test to the production

@martinaxgloria
Copy link
Contributor Author

Ok for me, for the pixi part I leave the review to @traversaro. The documentation can be refined later on when we will explain this test to the production

Yes, I just added a skeleton but for sure it will be modified with the next integrations. Thanks @Nicogene!

@Nicogene Nicogene merged commit f815cf2 into robotology:devel Mar 11, 2024
3 checks passed
@martinaxgloria martinaxgloria deleted the pixi-support branch March 11, 2024 13:09
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