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

Cleanup ergocub configuration files using enable_by and disable_by yarprobotinterface tags #641

Closed
traversaro opened this issue Apr 12, 2024 · 6 comments · Fixed by #645
Closed
Assignees

Comments

@traversaro
Copy link
Member

traversaro commented Apr 12, 2024

(I opened an issue as to get everyone involved aligned).

Since YARP 3.8.0, the yarprobotinterface gain the feature of enabled_by and disable_by tags, that can be used to have a single main yarprobotinterface xml file, that can be configure at yarprobotinterface startupt to enable and/or disable groups of devices. This has been implemented by @randaz81 in robotology/yarp#2890 to avoid the proliferation of hard to maintain variants of the yarprobotinterface for the robot. See R1's configuration files for how to use this conf files: https:/robotology/robots-configuration/blob/v2.6.1/R1SN003/CER.xml#L8 .

On ergoCub robots, I think it would be useful to use this feature. At least looking at ergoCubSN001, the current situation is the following:

  • ergocub_all.xml : conf file of the robotinterface with wholebodydnamics disabled and ros2 disabled, not sure if is used by anone
  • ergocub_wbd.xml : conf file of the robotinterface with wholebodydnamics enabled and ros2 disabled, used mainly by the AMI group and by anone that needs to use force estimation and torque control
  • ergocub_all_ros2.xml: conf file of the robotinterface with wholebodydnamics disabled and ros2 enabled, according to @SimoneMic used by people that just test the grasping
  • ergocub_wbd_ros2.xml: conf file of the robotinterface with wholebodydnamics enabled and ros2 enabled, I guess used mostly in experiments where both the walking and the navigation are used

The situation is quite chaotic, as it is quite common for a PR to update only a subset of those files, even if the modification is not related to ROS2 or wbd. So I think we could cleanup the situation as in the following (at first with ergoCubSN001, then the modification can be propagated to more robots):

Add a ergocub.xml file, that subsumes all the previous one, that by default has wholebodynamics enabled and ros2 disabled (please comment if you think that the default should be different). I would also modify yarprobotinterface.ini to point to ergocub.xml. Then, the previous configurations could be reproduced as the following:

Old invocation New invocation
yarprobotinterface --config ergocub_all.xml yarprobotinterface --disable_tags "(disable_wholebodynamics)"
yarprobotinterface --config ergocub_wbd.xml yarprobotinterface
yarprobotinterface --config ergocub_all_ros2.xml yarprobotinterface --enable_tags "(enable_ros2)" --disable_tags "(disable_wholebodynamics)"
yarprobotinterface --config ergocub_wbd_ros2.xml yarprobotinterface --enable_tags "(enable_ros2)"

(note that --config does not need to be specified as it will default to ergocub.xml as it is specified in yarprobotinterface.ini, YARP_ROBOT_NAME is set appropriately)

Comments are welcome. If there is consensus, I can implement the change at least for ergoCub robots, as the modifications are trivial. To avoid regression, we can leave the old files around for ~1 month, and then delete all of them

@pattacini
Copy link
Member

Thanks @traversaro 👍🏻

@SimoneMic
Copy link
Contributor

Hello,

Could this also be implemented in the simulation/Gazebo models?
Like in:

<plugin name="robotinterface" filename="libgazebo_yarp_robotinterface.so">
      <yarpRobotInterfaceConfigurationFile>model://ergoCub/conf/ergocub.xml</yarpRobotInterfaceConfigurationFile>
    </plugin>

Could it be possible to pass these parameters and structure the .xml in the same manner?

Thanks

@pattacini
Copy link
Member

Could this also be implemented in the simulation/Gazebo models?

Hi @SimoneMic

Probably, it'd be better to open a dedicated issue on https:/robotology/gazebo-yarp-plugins/issues to track such an idea/request.

@traversaro
Copy link
Member Author

Could this also be implemented in the simulation/Gazebo models?

Hi @SimoneMic

Probably, it'd be better to open a dedicated issue on https:/robotology/gazebo-yarp-plugins/issues to track such an idea/request.

This required a modification in Gazebo plugins that is tracked in robotology/gazebo-yarp-plugins#672 . If anyone wants to work on this feel free to ask, I will be happy to provide guidance on how to implement this feature.

traversaro added a commit to traversaro/robots-configuration that referenced this issue Apr 21, 2024
@pattacini pattacini linked a pull request Apr 21, 2024 that will close this issue
@traversaro
Copy link
Member Author

As there were no comments, I opened a PR implementing the changes discussed in this issue in #645 .

@pattacini
Copy link
Member

cc @SimoneMic

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