如何快速解决Github下载源码编译报错并顺利运行机器人等项目案例(Webots+ROS2)

有很多的朋友在我博客下留言交流,由于个人能力有限,加班也特别多,并不能有效解答,实在非常抱歉。于是决定写一篇通用性的解决方法的博客。

一般而言,大部分问题运用搜索工具能找到答案的,不在此赘述。

于是,我选择了最新的Webots2021b和ros2foxy做一下介绍。

遇到的问题如:

之后解决如:


但是如何解决,并没有提及,我使用的功能包是webots_ros2 1.1.0版本。

官方也在2小时前更新了源码,后续不会再有这个bug啦。 

这个版本有一些小bug,并不能直接在win10系统结合ros2foxy使用,于是去issues发求助并得到解决。


如下(github.com/cyberbotics/webots_ros2/issues/256):

Failed <<< webots_ros2_driver [9.47s, exited with code 1] #256
 Closed
zhangrelay opened this issue 3 days ago · 6 comments
 Closed
Failed <<< webots_ros2_driver [9.47s, exited with code 1]
#256
zhangrelay opened this issue 3 days ago · 6 comments
Comments
@zhangrelay
 
zhangrelay commented 3 days ago • 
Describe the Bug
win10 webots_ros2 1.1.0 foxy with webots 2021b

C:\ros_ws\webots_ros2>colcon build
[1.571s] root DEBUG Using proactor: IocpProactor
Starting >>> vision_msgs
Starting >>> webots_ros2_ur_e_description
Starting >>> webots_ros2_importer
Finished <<< webots_ros2_ur_e_description [3.91s]
Finished <<< webots_ros2_importer [3.83s]
[Processing: vision_msgs]vision_msgs:build - 34.0s]
Finished <<< vision_msgs [48.8s]
Starting >>> webots_ros2_msgs
[Processing: webots_ros2_msgs]
Finished <<< webots_ros2_msgs [34.1s]
Starting >>> webots_ros2_core
Starting >>> webots_ros2_driver
Finished <<< webots_ros2_core [3.62s]
Starting >>> webots_ros2_abb
Starting >>> webots_ros2_universal_robot
Starting >>> webots_ros2_epuck
Starting >>> webots_ros2_examples
Starting >>> webots_ros2_mavic
Starting >>> webots_ros2_tesla
Starting >>> webots_ros2_tiago
Finished <<< webots_ros2_abb [12.7s]
Starting >>> webots_ros2_tutorials
Finished <<< webots_ros2_universal_robot [12.9s]
Starting >>> webots_ros2_demos
Finished <<< webots_ros2_tiago [12.1s]
Finished <<< webots_ros2_mavic [12.7s]
Finished <<< webots_ros2_examples [13.0s]
Finished <<< webots_ros2_tesla [12.6s]
Finished <<< webots_ros2_epuck [13.3s]
Finished <<< webots_ros2_tutorials [5.91s]
Finished <<< webots_ros2_demos [8.31s]
Failed <<< webots_ros2_driver [43.9s, exited with code 1]

Summary: 14 packages finished [2min 7s]
1 package failed: webots_ros2_driver
3 packages not processed

Affected Packages
List of affected packages:

webots_ros2_driver
Screenshots

ros2

`
C:\ros_ws\webots_ros2>colcon build --packages-up-to webots_ros2_turtlebot
[1.491s] root DEBUG Using proactor: IocpProactor
Starting >>> vision_msgs
Finished <<< vision_msgs [11.9s]
Starting >>> webots_ros2_msgs
Finished <<< webots_ros2_msgs [11.6s]
Starting >>> webots_ros2_driver
Starting >>> webots_ros2_core
Finished <<< webots_ros2_core [3.78s]
Failed <<< webots_ros2_driver [9.47s, exited with code 1]

Summary: 3 packages finished [33.4s]
1 package failed: webots_ros2_driver
2 packages not processed
`

System

Webots Version: [2021b]
ROS Version: [foxy]
Operating System: [Windows 10]
Graphics Card: [Intel]
Additional context
Add any other context about the problem here.

@lukicdarkoo lukicdarkoo linked a pull request that will close this issue 3 days ago
Fix Windows build #258
 Merged
@lukicdarkoo
 
Member
lukicdarkoo commented 3 days ago
Thank you for reporting the problem, we working on fixing it. Meanwhile, if you are in hurry then you checkout at ad78a04

@lukicdarkoo lukicdarkoo added this to the 1.1.1 milestone 3 days ago
@lukicdarkoo lukicdarkoo added the bug label 3 days ago
@lukicdarkoo lukicdarkoo self-assigned this 3 days ago
@zhangrelay
 
Author
zhangrelay commented 3 days ago
Thank you for reporting the problem, we working on fixing it. Meanwhile, if you are in hurry then you checkout at ad78a04

Thank you very much, let me give it a try.

@zhangrelay
 
Author
zhangrelay commented 2 days ago
Thank you for reporting the problem, we working on fixing it. Meanwhile, if you are in hurry then you checkout at ad78a04

Finished <<< webots_ros2_driver [20.4s] This is ok.
But there is one last little problem.

Failed   <<< webots_ros2_control [11.6s, exited with code 1]

Summary: 16 packages finished [1min 4s]
  1 package failed: webots_ros2_control
  2 packages not processed
Looking forward to the 1.1.1 release.

Thanks a lot for reply.

@lukicdarkoo
 
Member
lukicdarkoo commented 2 days ago • 
A few questions:

Did you try from Fix Windows build #258?
Can you use the --event-handlers console_cohesion+ flag so we get more details (e.g. colcon build --event-handlers console_cohesion+)?
Did you sync the submodules, git pull --recurse-submodules?
Do you have necessary dependencies:
git clone --branch=ros2 https://github.com/ros-perception/vision_msgs.git src/vision_msgs
git clone --branch=ros2 https://github.com/ros-drivers/ackermann_msgs.git src/ackermann_msgs
git clone https://github.com/ros-controls/ros2_control.git src/ros2_control
git clone https://github.com/ros-controls/ros2_controllers.git src/ros2_controllers
git clone --branch=foxy-devel https://github.com/ros-controls/control_msgs.git src/control_msgs
git clone --branch=ros2 https://github.com/ros/angles.git src/angles
git clone --branch=foxy-devel https://github.com/ros-controls/realtime_tools.git src/realtime_tools
@zhangrelay
 
Author
zhangrelay commented 22 hours ago
A few questions:

Did you try from Fix Windows build #258?
Can you use the --event-handlers console_cohesion+ flag so we get more details (e.g. colcon build --event-handlers console_cohesion+)?
Did you sync the submodules, git pull --recurse-submodules?
Do you have necessary dependencies:
git clone --branch=ros2 https://github.com/ros-perception/vision_msgs.git src/vision_msgs
git clone --branch=ros2 https://github.com/ros-drivers/ackermann_msgs.git src/ackermann_msgs
git clone https://github.com/ros-controls/ros2_control.git src/ros2_control
git clone https://github.com/ros-controls/ros2_controllers.git src/ros2_controllers
git clone --branch=foxy-devel https://github.com/ros-controls/control_msgs.git src/control_msgs
git clone --branch=ros2 https://github.com/ros/angles.git src/angles
git clone --branch=foxy-devel https://github.com/ros-controls/realtime_tools.git src/realtime_tools
I followed the steps to compile and it was completely fine.

git clone --branch=fix-windows-build --recurse-submodules https://github.com/cyberbotics/webots_ros2.git
git all necessary dependencies
colcon build --event-handlers console_cohesion+
Finished <<< webots_ros2 [7.98s]

Summary: 42 packages finished [2min 57s]

colcon build is OK.

@zhangrelay
 
Author
zhangrelay commented 22 hours ago
Now all webots_ros2 demos can be run and used normally in win10 + ROS2.

@zhangrelay zhangrelay closed this 22 hours ago
@cyberbotics cyberbotics deleted a comment from zhangrelay 16 hours ago


评论 18
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangrelay

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值