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

Cannot launch webots_ros2_universal_robot after updated ubuntu22.04 #1015

Closed
lkx8421 opened this issue Dec 18, 2024 · 4 comments
Closed

Cannot launch webots_ros2_universal_robot after updated ubuntu22.04 #1015

lkx8421 opened this issue Dec 18, 2024 · 4 comments

Comments

@lkx8421
Copy link

lkx8421 commented Dec 18, 2024

when I used 'sudo apt updated' on ubuntu 22.04, I cannot use webots ros2 example 'ros2 launch webots_ros2_universal_robot multirobot_launch.py', log is

[INFO] [webots-1]: process started with pid [113805]
[INFO] [ros2_supervisor.py-2]: process started with pid [113807]
[INFO] [webots_controller_UR5e-3]: process started with pid [113810]
[INFO] [webots_controller_abbirb4600-4]: process started with pid [113813]
[INFO] [ros2-5]: process started with pid [113815]
[webots_controller_UR5e-3] The specified robot is not in the list of robots with controllers, retrying for another 50 seconds...
[webots_controller_abbirb4600-4] The specified robot is not in the list of robots with controllers, retrying for another 50 seconds...
[ros2_supervisor.py-2] The specified robot is not in the list of robots with controllers, retrying for another 50 seconds...
[webots_controller_UR5e-3] The specified robot is not in the list of robots with controllers, retrying for another 45 seconds...
[webots_controller_abbirb4600-4] Warning: Webots [R2023b] and libController [R2024a] versions are not the same for Robot 'abbirb4600'! Different versions can lead to undefined behavior.
[ros2_supervisor.py-2] Warning: Webots [R2023b] and libController [R2024a] versions are not the same for Robot 'Ros2Supervisor'! Different versions can lead to undefined behavior.
[webots_controller_abbirb4600-4] [INFO] [1734507005.729230951] [resource_manager]: Initialize hardware 'WebotsControl'
[webots_controller_abbirb4600-4] [INFO] [1734507005.729269366] [resource_manager]: Successful initialization of hardware 'WebotsControl'
[webots_controller_abbirb4600-4] [INFO] [1734507005.729296123] [resource_manager]: 'configure' hardware 'WebotsControl'
[webots_controller_abbirb4600-4] [INFO] [1734507005.729299426] [resource_manager]: Successful 'configure' of hardware 'WebotsControl'
[webots_controller_abbirb4600-4] [INFO] [1734507005.729305899] [resource_manager]: 'activate' hardware 'WebotsControl'
[webots_controller_abbirb4600-4] [INFO] [1734507005.729308036] [resource_manager]: Successful 'activate' of hardware 'WebotsControl'
[webots_controller_abbirb4600-4] terminate called after throwing an instance of 'std::runtime_error'
[webots_controller_abbirb4600-4] what(): Hardware name WebotsControl is duplicated. Please provide a unique 'name' in the URDF.
[webots_controller_abbirb4600-4] [ros2run]: Aborted
[ERROR] [webots_controller_abbirb4600-4]: process has died [pid 113813, exit code 250, cmd '/opt/ros/humble/share/webots_ros2_driver/scripts/webots-controller --robot-name=abbirb4600 --protocol=ipc --port=1234 ros2 --ros-args -r __ns:=/abb -p robot_description:=/opt/ros/humble/share/webots_ros2_universal_robot/resource/webots_abb_description.urdf -p use_sim_time:=True -p set_robot_state_publisher:=True --params-file /opt/ros/humble/share/webots_ros2_universal_robot/resource/ros2_control_abb_config.yaml'].

@Heeeeena
Copy link

I encountered the same problem. Previously, some of my feature packs and examples in Webots_ros2 were working properly, but for some reason, during recent runtime, all the examples are no longer working properly. I am using Webots2023b+Ubuntu 22.04 (WSL2)+Windows 11. When I start the launch file, the controller starts to report errors and disconnect from Webots2023 after connecting to it. Due to respawn=true, this process will continue to repeat and the connection will not be able to connect.
image
image

@Heeeeena
Copy link

我也遇到了同样的问题,之前我的Webots_ros2中的一些功能包和示例都正常工作,但不知何故,在最近的运行过程中,所有示例都不再正常工作。我使用的是Webots2023b+Ubuntu 22.04 (WSL2)+Windows 11。当我启动启动文件时,控制器开始报错,并在连接到Webots2023后断开连接。由于respawn=true,这个过程会不断重复,连接将无法连接。 图像 图像

I noticed that someone had already mentioned this issue #1011 earlier, and when I followed their method to change the relevant content in the webots_ros2_control package and recompiled it, the problem was solved. Thanks very much!

@2625102155
Copy link

我也遇到了同样的问题,之前我的Webots_ros2中的一些功能包和示例都正常工作,但不知何故,在最近的运行过程中,所有示例都不再正常工作。我使用的是Webots2023b+Ubuntu 22.04 (WSL2)+Windows 11。当我启动启动文件时,控制器开始报错,并在连接到Webots2023后断开连接。由于respawn=true,这个过程会不断重复,连接将无法连接。 图像 图像

I noticed that someone had already mentioned this issue #1011 earlier, and when I followed their method to change the relevant content in the webots_ros2_control package and recompiled it, the problem was solved. Thanks very much!

I changed it according to their method, but there is still this problem, can you please explain in detail how you modified it, thank you

@Heeeeena
Copy link

Heeeeena commented Jan 13, 2025

我也遇到了同样的问题,之前我的Webots_ros2中的一些功能包和示例都正常工作,但不知何故,在最近的运行过程中,所有示例都不再正常工作。我使用的是Webots2023b+Ubuntu 22.04 (WSL2)+Windows 11。当我启动启动文件时,控制器开始报错,并在连接到Webots2023后断开连接。由于respawn=true,这个过程会不断重复,连接将无法连接。 图像 图像

I noticed that someone had already mentioned this issue #1011 earlier, and when I followed their method to change the relevant content in the webots_ros2_control package and recompiled it, the problem was solved. Thanks very much!

I changed it according to their method, but there is still this problem, can you please explain in detail how you modified it, thank you

If you installed through source code compilation, you can directly modify the 149th line of webots_ros2_control/src/Ros2Control. cpp, and change resourceManager ->load_urdf (urdfString, false, false); Replace with

resourceManager ->load_urdf(
"<robot name=\"default_robot\">"
"  <ros2_control name=\"default_control\" type=\"hardware_interface/DefaultHardware\">"
"    <hardware>"
"      <plugin>hardware_interface/DefaultPlugin</plugin>"
"    </hardware>"
"  </ros2_control>"
"</robot>",
false, false);

If you installed through apt, you can run

wget -O /tmp/hotfix.deb  http://snapshots.ros.org/humble/2024-08-28/ubuntu/pool/main/r/ros-humble-hardware-interface/ros-humble-hardware-interface_2.43.0-1jammy.20240823.145349_amd64.deb  && \
sudo apt install -y --allow-downgrades /tmp/hotfix.deb && \
rm -f /tmp/hotfix.deb

to install a slightly older version of resource_manager.

@lkx8421 lkx8421 closed this as completed Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants