Skip to content

适配 ubuntu20.04 ros-galactic 编译运行环境#10

Open
julyfun wants to merge 4 commits into
chenjunnn:galacticfrom
SJTU-RoboMaster-Team:ubuntu20.04-test
Open

适配 ubuntu20.04 ros-galactic 编译运行环境#10
julyfun wants to merge 4 commits into
chenjunnn:galacticfrom
SJTU-RoboMaster-Team:ubuntu20.04-test

Conversation

@julyfun

@julyfun julyfun commented Apr 6, 2023

Copy link
Copy Markdown

tf2-geometry-msgs

tf2_geometry_msgs/tf2_geometry_msgs.hpp: 没有那个文件或目录
   14 | #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
在对应库下只有 tf2_geometry_msgs.h

create_subscription 中的函数须为非引用传参

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

no match for ‘operator=’ (operand types are ‘rclcpp::Subscription<sensor_msgs::msg::Image_<std::allocator<void> > >::SharedPtr’ {aka ‘std::shared_ptr<rclcpp::Subscription<sensor_msgs::msg::Image_<std::allocator<void> > > >’} and ‘std::shared_ptr<rclcpp::Subscription<std::shared_ptr<const sensor_msgs::msg::Image_<std::allocator<void> > >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<std::shared_ptr<const sensor_msgs::msg::Image_<std::allocator<void> > >, std::allocator<void> > > >’)
   89 |     std::bind(&ArmorDetectorNode::imageCallback, this, std::placeholders::_1));

@chenjunnn chenjunnn changed the base branch from main to galactic April 6, 2023 21:00
@chenjunnn

Copy link
Copy Markdown
Owner

我创建了一个新的 Galactic 分支,但是还需要你更改 github/workflows/ros_ci.yml 里的版本,否则 CI 会不通过
并且麻烦你将 create_subscription 的写法改成与目前的官方文档一致(更改 imageCallback() 的参数),我会在后续 main 分支的更新中也改掉这个问题

@julyfun

julyfun commented Apr 7, 2023

Copy link
Copy Markdown
Author

@chenjunnn 已经修改 ci 配置和 create_subscription 用法

@chenjunnn chenjunnn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI还需要一些修改才能正常运行

Comment thread .github/workflows/ros_ci.yml Outdated
Comment thread .github/workflows/ros_ci.yml
julyfun added 3 commits April 9, 2023 10:19
## tf2-geometry-msgs
```
tf2_geometry_msgs/tf2_geometry_msgs.hpp: 没有那个文件或目录
   14 | #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
在对应库下只有 tf2_geometry_msgs.h
```

## create_subscription 中的函数须为非引用传参
`gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0`

```
no match for ‘operator=’ (operand types are ‘rclcpp::Subscription<sensor_msgs::msg::Image_<std::allocator<void> > >::SharedPtr’ {aka ‘std::shared_ptr<rclcpp::Subscription<sensor_msgs::msg::Image_<std::allocator<void> > > >’} and ‘std::shared_ptr<rclcpp::Subscription<std::shared_ptr<const sensor_msgs::msg::Image_<std::allocator<void> > >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<std::shared_ptr<const sensor_msgs::msg::Image_<std::allocator<void> > >, std::allocator<void> > > >’)
   89 |     std::bind(&ArmorDetectorNode::imageCallback, this, std::placeholders::_1));

```
@julyfun julyfun force-pushed the ubuntu20.04-test branch from cb2f240 to 88d45b7 Compare April 9, 2023 02:19
@julyfun

julyfun commented Apr 9, 2023

Copy link
Copy Markdown
Author

修改 cli 中的 ubuntu 版本和 push 目标分支

@chenjunnn

Copy link
Copy Markdown
Owner

请修改processor中的clang-format报错:

5: - #include "armor_processor/tracker.hpp"
5: - 
5: - #include <angles/angles.h>
5: - #include <tf2/LinearMath/Matrix3x3.h>
5: - #include <tf2/LinearMath/Quaternion.h>
5: - #include <tf2/convert.h>
5: - 
5: - #include <rclcpp/logger.hpp>
5: - #include <tf2_geometry_msgs/tf2_geometry_msgs.h>

5: + #include "armor_processor/tracker.hpp"
5: + 
5: + #include <angles/angles.h>
5: + #include <tf2/LinearMath/Matrix3x3.h>
5: + #include <tf2/LinearMath/Quaternion.h>
5: + #include <tf2/convert.h>
5: + #include <tf2_geometry_msgs/tf2_geometry_msgs.h>
5: + 
5: + #include <rclcpp/logger.hpp>

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.

3 participants