1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## 🪜 简练学习路线

1. **class**
- 学习 C++ OOP:类、继承、封装,打好基础。

2. **鱼香ROS**
- 入门 ROS2:节点、话题、服务,掌握基本通信。

3. **Qt + ROS2 接口(无线调参)**
- 用 Qt 做 GUI,结合 ROS2 参数动态调节。

4. **ros2_control**
- 学习控制框架:硬件接口、控制器插件,理解抽象层次。

5. **UnityROS 联合仿真**
- Unity 与 ROS2 联合仿真,练习跨平台数据交互。

6. **Point-LIO**
- 激光+IMU 融合里程计,理解点云处理与优化。

7. **FAST-LIO**
- 在 Point-LIO 基础上掌握实时优化与稀疏矩阵处理。

8. **VLA**
- 学习视觉+激光+IMU 多传感器融合,难度最高。

9. **IssacSim**
- NVIDIA 高级仿真平台,结合 GPU 加速与 ROS2 接口。

---

## 📊 总结顺序

class → 鱼香ROS → Qt+ROS2接口 → ros2_control → UnityROS → Point-LIO → FAST-LIO → VLA → IssacSim

class学习笔记

class1基础构造与析构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
using namespace std;
// 类的声明
class Bird
{
public://共有:外部可用
void fly(int h); // 成员函数 功能
Bird(int color); // 构造函数———初始化
~Bird(); // 析构函数————结束后怎么做
private://私有:对外不能用
int color; // 成员变量 属性 特征
};
int main(){
int a;
Bird yw(100);
yw.fly(800);

return 0;
}
void Bird::fly(int h)
{
cout<<"鸟飞"<<h<<"米"<<endl;
}
// Bird::Bird(int color )//构造函数-出厂设置
// {
// this->color=color; //“this->”指当前运行的变量是成员变量
// cout << "鸟出生了"<<endl;
// }
Bird::Bird(int color):color(color)//构造函数-出厂设置
{
cout << "鸟出生了"<<endl;
}
Bird::~Bird()
{
cout << "鸟死了。。。"<<endl;
}
class2基础构造与析构
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
using namespace std;
class Tree
{
private:
int age;

public:
int height;
void grow();
Tree(); // 无参构造
Tree(int a, int h); // 有参构造
~Tree(); // 析构
};

int main()
{
Tree t1(1, 3);
Tree t2;
t1.grow();
t2.grow();
return 0;
}

Tree::Tree()
{
this->age = 0;
height = 0;
}
// 初始化 成员属性 变量值
Tree::Tree(int a, int h) : age(a), height(h)
{
}

void Tree::grow(void)
{
this->height += 5;
this->age++;
}

Tree::~Tree()
{
cout << "家具厂" << endl;
}
class3单一继承
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <iostream>
using namespace std;
class Dog
{
protected: // 保护的 家族内可见
int age;
string name;

public:
Dog() {}
Dog(int a, string n);
void eat();
virtual ~Dog();
Dog(const Dog &other);
};

class PetDog : public Dog
{
private:
int price;

public:
PetDog(int age, string name, int price);
PetDog(const Dog &dog, int price);
void emoValue(void);
~PetDog();
};

int main()
{
Dog hh(1, "欢欢");
hh.eat();

// PetDog pp(2, "peach", 1000);
// pp.eat();
// pp.emoValue();

PetDog aa(hh, 2000);

return 0;
}

PetDog::PetDog(const Dog &dog, int price)
: Dog(dog), price(price)
{
cout << "PetDog子类初始化 (from Dog)" << endl;
}

Dog::Dog(int a, string n) : age(a), name(n)
{
cout << "Dog父类初始化" << endl;
}
void Dog::eat()
{
cout << "吃 米田共" << endl;
}

PetDog::PetDog(int age, string name, int price) : Dog(age, name), price(price)
{
cout << "PetDog子类初始化" << endl;
}

void PetDog::emoValue(void)
{
cout << "emotional value" << endl;
}
Dog::~Dog()
{
cout << "~Dog dead" << endl;
}
PetDog::~PetDog()
{
cout << "~PetDog dead" << endl;
}

Dog::Dog(const Dog &other) : age(other.age), name(other.nclass4多项继承t << "Dog拷贝构造" << endl;
}

class4多项继承
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <bits/stdc++.h>
using namespace std;

class Eagle
{
public:
void eyeLook();
};

class Wolf
{
public:
void earListen();
};

class Bear
{
public:
void power();
};

class Cheetah
{
public:
void run();
};
class WBQ : public Eagle, public Wolf, public Bear, public Cheetah
{
public:
void fight();
};
int main()
{
WBQ wbq;
wbq.fight();
return 0;
}

void Eagle::eyeLook()
{
cout << "Eagle's eye" << endl;
}
void Wolf::earListen()
{
cout << "Wolf's ear" << endl;
}
void Bear::power()
{
cout << "Bear's power" << endl;
}
void Cheetah::run()
{
cout << "Cheetah's run" << endl;
}
void WBQ::fight()
{
this->eyeLook();
this->earListen();
this->power();
this->run();
}
class5抽象类-纯虚函数
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <bits/stdc++.h>
using namespace std;

class YueQi
{
protected:
int price;

public:
YueQi(int jia);
/*演奏*/
// virtual 虚拟
virtual void play() = 0; // 纯虚函数,此功能不需要本类实现,子类实现
~YueQi();
};

class JiaZiGu : public YueQi
{
public:
JiaZiGu(int jia) : YueQi(jia) {}
void play()
{
cout << "kick kick" << endl;
}
};

class SaKeSi : public YueQi
{
public:
SaKeSi(int jia) : YueQi(jia) {}
void play()
{
cout << "didi dada" << endl;
}
};

class Piano : public YueQi
{
public:
Piano(int jia) : YueQi(jia) {}
void play()
{
cout << "Juebieshu" << endl;
}
};

int main()
{
// //在栈区创建对象
// JiaZiGu jzg(1000);
// jzg.play();

//组建乐队
//创建指针类型的数组
//new:相当于malloc 在堆区创建对象
//delete: 相当于free 释放堆区内存空间
YueQi* yd[3]={new JiaZiGu(1000),new SaKeSi(800),new Piano(2000)};
//表演起来
for (int i=0;i<10;i++){
yd[i%3]->play();
}

for(int i=0;i<3;i++){
delete yd[i];
}
return 0;
}

// YueQi = musical instruments
YueQi::YueQi(int jia) : price(jia)
{
cout << "YueQi is initialization(初始化)." << endl;
}

YueQi::~YueQi()
{
cout << "YueQi has been reclaimed(回收)." << endl;
}
class6运算符重载
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <bits/stdc++.h>
using namespace std;


class Student {
public:
//函数 重载overload
int add(int a, int b);
double add(double a,double b);
string add(string a,string b);

void operator+(Student & stu);
void operator-(Student & stu);

};

int main()
{
Student xm;
cout<<xm.add(3,6)<<endl;
cout<<xm.add(3.5,6.8)<<endl;
cout<<xm.add("hello","world")<<endl;
Student xh;
xm+xh;
xm-xh;

return 0;
}

int Student::add(int a, int b){
return a+b;
}
double Student::add(double a,double b){
return a+b;
}
string Student::add(string a,string b){
return a+b;
}
void operator+(Student & stu){
cout<<"合作"<<endl;
}
void operator-(Student & stu){
cout<<"消耗"<<endl;
}

class7友元函数的使用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <bits/stdc++.h>
using namespace std;
class TanGuan;
class JianChaGuan
{
private:
int sumZangKuan;

public:
JianChaGuan() { sumZangKuan = 0; }
void souCha(const TanGuan &tg); // 搜查
int operator+(const TanGuan &tg);
}; // 注意编译顺序(从上到下)

class TanGuan
{
private:
int tanMoney;

public:
TanGuan() { tanMoney = 0; }
void setMoney(int m)
{
tanMoney += m;
}
// friend void JianChaGuan::souCha(const TanGuan &tg);
// friend int JianChaGuan::operator+(const TanGuan &tg);
// 授权给某个成员函数
friend class JianChaGuan;//授权给类的所有操作

};

int main()
{
TanGuan zdh; // 赵德汉
zdh.setMoney(1000);
zdh.setMoney(8888);
JianChaGuan hlp;
hlp.souCha(zdh);
TanGuan zz;
zz.setMoney (20000);
cout<<hlp+zdh<<endl;
cout<<hlp+zz<<endl;
return 0;
}

void JianChaGuan::souCha(const TanGuan &tg)
{
cout << "搜查出人民币:" << tg.tanMoney << "元\n";
}

int JianChaGuan::operator+(const TanGuan &tg)
{
sumZangKuan += tg.tanMoney;
return sumZangKuan;
}

class8示例例题
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#include <bits/stdc++.h>
using namespace std;
/*题目名:神妖比拼
题目描述:
1.用给定抽象类Actor(演员类)与主函数main(),
设计Actor类公有派生类God类Monster类完成西游记神妖大比拼。
2.God类数据成员:Name(神仙名,string),Place(福仙居所,string),
Power(神仙攻击力,int):
3.Monster类数据成员:Name(妖名,string),
Prototype(妖怪原型,string),Power(怪攻击力,int);
4.通过键盘输入神仙和一妖怪的数据,二者攻击力进行比拼,输出相应信息。

输入描述:输入为两行数据,第一行是神仙的相关数据,包含神仙名(string)、
神仙居所(string)、神仙攻击力(int),空格分隔;第二行是妖怪的相关数据,
包含妖怪名(string)、妖怪原型(string)、妖怪攻击力(int),空格分隔。
输出描述:针对输入数据,输出一行数据,输出格式参照样例,根据神仙和妖怪的攻击力比较结果,
按“神仙居所,神仙名 [比较符号] 妖怪名 whose prototype was 妖怪原型”的格式输出(比较符号为>、=、<)。示例:
示例1
-输入:
KingDragon EasternSea 2000
KingSilverHorn Boy 1800
-输出:
EasternSea,KingDragon > KingSilverHorn whose prototype was Boy
*/
class Actor
{
public:
virtual void show() const = 0;
};
class God;
class Monster;
class God : public Actor
{
private:
string Name;
string Place;
int Power;

public:
God(string n, string p, int po);
void show() const
{
cout <<Place<<","<<Name;
}
int operator-(const Monster &yg) const;
};
class Monster : public Actor
{
private:
string Name;
string Prototype;
int Power;

public:
void set(string n, string p, int po);
void show() const
{
cout<<Name<<"whose Prototype is"<<Prototype;
}
friend class God;
};

int main()
{
string n, p;
int po, s;
cin >> n >> p >> po;
God g(n, p, po);
cin >> n >> p >> po;
Monster m;
m.set(n, p, po);
s = g - m;

if (s > 0)
{
g.show();
cout << ">";
m.show();
}
else if (s == 0)
{
g.show();
cout << "=";
m.show();
}
else
{
g.show();
cout << "<";
m.show();
}
cout << endl;
return 0;
}

God::God(string n, string p, int po) : Name(n), Place(p), Power(po)
{
}

void Monster::set(string n, string p, int po)
{
Name = n;
Prototype = p;
Power = po;
}

int God::operator-(const Monster &yg) const
{
return this->Power - yg.Power;
}
示例
1
2


鱼香ros

用qt写一个ros2接口

ros2_control

unityros联合仿真

pointlio重定向

fastlio重定向

issacsim

vla