ROS入门-启动
1. 项目地址
https://github.com/LittleMatcher/as_ws_2024
2. 流程
第一步创建工作空间
$ mkdir -p ~/as_ws/src #ROS三步走,这里的地址可以修改
$ cd ~/as_ws/
$ catkin init
第二步克隆项目
$ git clone https://github.com/LittleMatcher/as_ws_2024.git
第三步编译
$ catkin build
$ source devel/setup.bash
第四步运行
$ roslaunch <project> <launch file>
$ roslaunch two_drones_pkg two_drones.launch static:=True #static的作用取决于launch文件
3. 主要代码
frames_publisher_node.cpp
// 2. Populate the two transforms for the AVs, using the variable "time"
// computed above. Specifically:
// - AV1World should have origin in [cos(time), sin(time), 0.0] and
// rotation such that:
// i) its y axis stays tangent to the trajectory and
// ii) the z vector stays parallel to that of the world frame
//
// - AV2World shoud have origin in [sin(time), 0.0, cos(2*time)], the
// rotation is irrelevant to our purpose.
// NOTE: AV1World's orientation is crucial for the rest fo the assignment,
// make sure you get it right
//
// HINTS:
// - check out the ROS tf Tutorials: http://wiki.ros.org/tf/Tutorials,
// http://wiki.ros