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

Port wholebodydynamics to the usage of MASserver/client #865

Closed
Nicogene opened this issue Apr 20, 2023 · 6 comments · Fixed by #876
Closed

Port wholebodydynamics to the usage of MASserver/client #865

Nicogene opened this issue Apr 20, 2023 · 6 comments · Fixed by #876
Assignees

Comments

@Nicogene
Copy link
Member

Nicogene commented Apr 20, 2023

Is your feature request related to a problem?

No response

The solution you would like to have available

We ought to port wholebodydynamics to the usage of multipleanalogsensorsclient in order to finalize the deprecation of analoSensor for publishing FT data (see robotology/robots-configuration#470)

if (autoconnect)
{
//from iCub to wholeBodyDynamics
Network::connect(string("/"+local_name+"/filtered/inertial:o").c_str(),string("/"+local_name+"/inertial:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/inertial").c_str(), string("/"+local_name+"/unfiltered/inertial:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/left_arm/analog:o").c_str(), string("/"+local_name+"/left_arm/FT:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/right_arm/analog:o").c_str(), string("/"+local_name+"/right_arm/FT:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/left_leg/analog:o").c_str(), string("/"+local_name+"/left_leg/FT:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/right_leg/analog:o").c_str(), string("/"+local_name+"/right_leg/FT:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/left_foot/analog:o").c_str(), string("/"+local_name+"/left_foot/FT:i").c_str(),"tcp",false);
Network::connect(string("/"+robot_name+"/right_foot/analog:o").c_str(), string("/"+local_name+"/right_foot/FT:i").c_str(),"tcp",false);
//from wholeBodyDynamics to iCub (mandatory)
Network::connect(string("/"+local_name+"/left_arm/Torques:o").c_str(), string("/"+robot_name+"/joint_vsens/left_arm:i").c_str(),"tcp",false);
Network::connect(string("/"+local_name+"/right_arm/Torques:o").c_str(),string("/"+robot_name+"/joint_vsens/right_arm:i").c_str(),"tcp",false);
Network::connect(string("/"+local_name+"/left_leg/Torques:o").c_str(), string("/"+robot_name+"/joint_vsens/left_leg:i").c_str(),"tcp",false);
Network::connect(string("/"+local_name+"/right_leg/Torques:o").c_str(),string("/"+robot_name+"/joint_vsens/right_leg:i").c_str(),"tcp",false);
Network::connect(string("/"+local_name+"/torso/Torques:o").c_str(), string("/"+robot_name+"/joint_vsens/torso:i").c_str(),"tcp",false);
//from wholeBodyDynamics to iCub (optional)
if (Network::exists(string("/"+robot_name+"/joint_vsens/left_wrist:i").c_str()))
Network::connect(string("/"+local_name+"/left_wrist/Torques:o").c_str(), string("/"+robot_name+"/joint_vsens/left_wrist:i").c_str(),"tcp",false);
if (Network::exists(string("/"+robot_name+"/joint_vsens/right_wrist:i").c_str()))
Network::connect(string("/"+local_name+"/right_wrist/Torques:o").c_str(),string("/"+robot_name+"/joint_vsens/right_wrist:i").c_str(),"tcp",false);
}

Alternatives you have considered

No response

Additional context

No response

@Nicogene
Copy link
Member Author

This activity will start as soon as we have completed robotology/robots-configuration#485

Nicogene added a commit to Nicogene/icub-main that referenced this issue May 19, 2023
@Nicogene Nicogene linked a pull request May 19, 2023 that will close this issue
@Nicogene
Copy link
Member Author

PR:

Right now the changes are breaking for those who still use analog:o, but since we want to replace it w/ the idyntree wbd I would not spend too much effort to support any possible configuration.

cc @traversaro @pattacini

@pattacini
Copy link
Member

There are CAN robots that we still need to maintain in terms of the red-ball demo and thus the current WBD.

The migration to the idyntree-based WBD is not straightforward as we'd need the URDF and thus won't happen any time soon.

@traversaro
Copy link
Member

Probably we need to migrate CAN-based sensors from canBusAnalogSensor to canBusFTSensor (see #813), so that the MAS interfaces are exposed?

@pattacini
Copy link
Member

Probably we need to migrate CAN-based sensors from canBusAnalogSensor to canBusFTSensor (see #813), so that the MAS interfaces are exposed?

Yep, that's a good option.
We could do that for those CAN robots that we decide to keep up-to-date.
For the rest, we can say that they're covered up to a certain distro.

@Nicogene
Copy link
Member Author

Nicogene commented May 31, 2023

As reported here the current implementation is working fine, and if robots-configuration is up-to-date no robot is kept back, since this

Probably we need to migrate CAN-based sensors from canBusAnalogSensor to canBusFTSensor (see #813), so that the MAS interfaces are exposed?

has been done here robotology/robots-configuration#517.

My opinion is that keeping the implementation of reading from a port analog:o and the MAS client is not worthy, since this module is in a kind of "deprecation" state.
It has several hardcoded parameters since it is not reading any urdf as the idyntree twin does, for this reason for new robots it has poor performances, independently of these changes.

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.

3 participants