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

Removed SearchMonitor #46

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Removed SearchMonitor #46

merged 1 commit into from
Aug 2, 2024

Conversation

randaz81
Copy link
Member

A fix for #45

@randaz81
Copy link
Member Author

To be tested on a working setup

@pattacini pattacini requested a review from traversaro July 31, 2024 12:33
@pattacini pattacini assigned randaz81 and unassigned traversaro Jul 31, 2024
@pattacini pattacini linked an issue Jul 31, 2024 that may be closed by this pull request
@pattacini
Copy link
Member

At first sight, judging from the changes, we are losing a whole functionality.

@randaz81
Copy link
Member Author

It's not clear to me if that code is manipulating config parameters (*), adding default values, or just printing help messages. Do you have a setup where it can be tested?

(*) in this case some changes have be applied in the .ini file.

@pattacini
Copy link
Member

I've no memory of that functionality: it was developed long long time ago.
Thus, I need to check it in-depth.

Probably, it may help to know how the functionalities offered by the methods getMonitor() / setMonitor() are remapped.

@pattacini
Copy link
Member

pattacini commented Jul 31, 2024

Do you have a setup where it can be tested?

Ideally, there's a dedicated test as suggested by @traversaro:

Need to check if it's still working though.

@traversaro
Copy link
Member

Need to check if it's still working though.

I am currently trying to do that, I will keep you posted.

@randaz81
Copy link
Member Author

randaz81 commented Aug 1, 2024

I'm still not 100% sure but I think that the only purpose of that code is to print the values read from the configuration file:

[INFO] Checking "robot": = icub (Getting robot name)
[INFO] Checking "left_arm": = on (Getting left arm use flag)
[INFO] Checking "right_arm": = on (Getting right arm use flag)
[INFO] Checking "torso": Getting torso use flag (default on)
[INFO] Checking "speech": = on (Getting speech use flag)
[INFO] Checking "use_network": = off (Getting network enable)
[INFO] Checking "simulation": = off (Getting simulation enable)
[INFO] Checking "traj_time": = 1.0 (Getting trajectory time)
[INFO] Checking "reach_tol": = 0.01 (Getting reaching tolerance)
[INFO] Checking "eye": = left (Getting the used eye)
[INFO] Checking "idle_tmo": = 5.0 (Getting idle timeout)
[INFO] Checking "thread_period": = 20 (Getting thread period [ms])
[INFO] Checking "pitch.min": = min -10.0 (Getting minimum value)
[INFO] Checking "pitch.min": = -10.0 (Getting minimum value)
[INFO] Checking "pitch.max": = max 10.0 (Getting maximum value)
[INFO] Checking "pitch.max": = 10.0 (Getting maximum value)
[INFO] Checking "roll.min": Getting minimum value
[INFO] Checking "roll.max": Getting maximum value
[INFO] Checking "yaw.min": Getting minimum value
[INFO] Checking "yaw.max": Getting maximum value
[INFO] Checking "grasp_enable": = on (Getting arm grasp mode)
[INFO] Checking "reach_offset": = reach_offset 0.0 -0.0500000000 ... (Getting reaching offset)
[INFO] Checking "reach_offset": = reach_offset 0.0 -0.0500000000 ... (Getting reaching offset)
[INFO] Checking "grasp_offset": = grasp_offset 0.0 0.0 0.0 (Getting grasping offset)
[INFO] Checking "grasp_offset": = grasp_offset 0.0 0.0 0.0 (Getting grasping offset)
[INFO] Checking "hand_orientation": = hand_orientation 0.0 -0.707106 ... (Getting hand orientation)
[INFO] Checking "hand_orientation": = hand_orientation 0.0 -0.707106 ... (Getting hand orientation)
[INFO] Checking "impedance_velocity_mode": = on (Getting arm impedance-velocity-mode)
[INFO] Checking "impedance_stiffness": = impedance_stiffness 0.40000000 ... (Getting joints stiffness)
[INFO] Checking "impedance_stiffness": = impedance_stiffness 0.40000000 ... (Getting joints stiffness)
[INFO] Checking "impedance_damping": = impedance_damping 0.002 0.002  ... (Getting joints damping)
[INFO] Checking "impedance_damping": = impedance_damping 0.002 0.002  ... (Getting joints damping)
[INFO] Checking "grasp_enable": = on (Getting arm grasp mode)
[INFO] Checking "reach_offset": = reach_offset 0.0 0.05000000000 ... (Getting reaching offset)
[INFO] Checking "reach_offset": = reach_offset 0.0 0.05000000000 ... (Getting reaching offset)
[INFO] Checking "grasp_offset": = grasp_offset 0.0 0.0 0.0 (Getting grasping offset)
[INFO] Checking "grasp_offset": = grasp_offset 0.0 0.0 0.0 (Getting grasping offset)
[INFO] Checking "hand_orientation": = hand_orientation 0.0 -0.707106 ... (Getting hand orientation)
[INFO] Checking "hand_orientation": = hand_orientation 0.0 -0.707106 ... (Getting hand orientation)
[INFO] Checking "impedance_velocity_mode": = on (Getting arm impedance-velocity-mode)
[INFO] Checking "impedance_stiffness": = impedance_stiffness 0.40000000 ... (Getting joints stiffness)
[INFO] Checking "impedance_stiffness": = impedance_stiffness 0.40000000 ... (Getting joints stiffness)
[INFO] Checking "impedance_damping": = impedance_damping 0.002 0.002  ... (Getting joints damping)
[INFO] Checking "impedance_damping": = impedance_damping 0.002 0.002  ... (Getting joints damping)
[INFO] Checking "poss": = poss -30.0 30.0 0.0 45.0 0.0 0 ... (Getting home poss)
[INFO] Checking "poss": = poss -30.0 30.0 0.0 45.0 0.0 0 ... (Getting home poss)
[INFO] Checking "vels": = vels 10.0 10.0 10.0 10.0 10.0  ... (Getting home vels)
[INFO] Checking "vels": = vels 10.0 10.0 10.0 10.0 10.0  ... (Getting home vels)
[INFO] Checking "hysteresis_thres": = 0.14999999999999999 (Getting hysteresis threshold)
[INFO] Checking "sphere_radius": = 0.050000000000000003 (Getting sphere radius)
[INFO] Checking "sphere_tmo": = 2.0 (Getting sphere timeout)
[INFO] Checking "release_tmo": = 4.0 (Getting release timeout)
[INFO] Checking "open_hand": = open_hand 0.0 0.0 0.0 0.0 0.0  ... (Getting openHand poss)
[INFO] Checking "open_hand": = open_hand 0.0 0.0 0.0 0.0 0.0  ... (Getting openHand poss)
[INFO] Checking "close_hand": = close_hand 20.0 80.0 30.0 20.0 ... (Getting closeHand poss)
[INFO] Checking "close_hand": = close_hand 20.0 80.0 30.0 20.0 ... (Getting closeHand poss)
[INFO] Checking "vels_hand": = vels_hand 20.0 40.0 50.0 50.0  ... (Getting hand vels)
[INFO] Checking "vels_hand": = vels_hand 20.0 40.0 50.0 50.0  ... (Getting hand vels)

Or, if the parameters are not found, to print the default value that it will be used:

[ERROR] |yarp.os.Property| cannot read from config2.ini
[INFO] Checking "robot": Getting robot name (default icub)
[INFO] Checking "left_arm": Getting left arm use flag (default on)
[INFO] Checking "right_arm": Getting right arm use flag (default on)
[INFO] Checking "torso": Getting torso use flag (default on)
[INFO] Checking "speech": Getting speech use flag (default on)
[INFO] Checking "use_network": Getting network enable (default off)
[INFO] Checking "simulation": Getting simulation enable (default off)
[INFO] Checking "traj_time": Getting trajectory time (default 2.0)
[INFO] Checking "reach_tol": Getting reaching tolerance (default 0.01)
[INFO] Checking "eye": Getting the used eye (default left)
[INFO] Checking "idle_tmo": Getting idle timeout (default 10000000000.0)
[INFO] Checking "thread_period": Getting thread period [ms] (default 20)
[INFO] Checking "grasp_enable": Getting arm grasp mode (default on)
[INFO] Checking "reach_offset": Getting reaching offset
[INFO] Checking "grasp_offset": Getting grasping offset
[INFO] Checking "hand_orientation": Getting hand orientation
[INFO] Checking "impedance_velocity_mode": Getting arm impedance-velocity-mode (default off)
[INFO] Checking "impedance_stiffness": Getting joints stiffness
[INFO] Checking "impedance_damping": Getting joints damping
[INFO] Checking "poss": Getting home poss
[ERROR] Missing 'poss' parameter
[INFO] Checking "vels": Getting home vels
[ERROR] Missing 'vels' parameter
[ERROR] Error in parameters section 'home_arm'
[ERROR] |yarp.os.impl.ThreadImpl| A thread failed to start with error code: 0
[INFO] |yarp.os.RFModule| RFModule failed to open.

@pattacini
Copy link
Member

Thank you @randaz81 for doing the test 👍🏻

I'm still not 100% sure but I think that the only purpose of that code is to print the values read from the configuration file:

I've also double-checked the code and we should be safe removing it as @randaz81 is right about its purpose.

For now, there's no equivalent functionality that has an easy drop-in replacement as the conf files would need to be refactored to rely on the new way (see robotology/yarp#3059).

All considered, we can proceed with merging.

@pattacini pattacini merged commit 71ea6b7 into master Aug 2, 2024
@pattacini pattacini deleted the RemovedSearchMonitor branch August 2, 2024 07:10
@traversaro
Copy link
Member

Thanks @pattacini @randaz81 !

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.

Compilation failure with yarp 3.10
3 participants