LOCO定位系统入门教程-在ROS下扫描和检测crazyflie
说明:
- 介绍如何在ROS下扫描和检测crazyflie
步骤:
crazyflie开机
扫描和检测crazyflie
rosrun crazyflie_tools scan
- 结果如下
radio://0/80/2M
- 新建一个终端,启动crazyflie
roslaunch crazyflie_demo crazyflie_bringup.launch
- 查看话题
rostopic list
/crazyflie/battery
/crazyflie/cmd_full_state
/crazyflie/cmd_hover
/crazyflie/cmd_position
/crazyflie/cmd_stop
/crazyflie/cmd_vel
/crazyflie/cmd_velocity_world
/crazyflie/external_pose
/crazyflie/external_position
/crazyflie/imu
/crazyflie/joy
/crazyflie/joy/set_feedback
/crazyflie/magnetic_field
/crazyflie/packets
/crazyflie/pressure
/crazyflie/rssi
/crazyflie/temperature
/diagnostics
/rosout
/rosout_agg
- 查看电池的电量
rostopic echo /crazyflie/battery
data: 3.631671667098999
---
data: 3.6369502544403076
---
- 查看imu数据
rostopic echo /crazyflie/imu
---
header:
seq: 17073
stamp:
secs: 1692343505
nsecs: 830645560
frame_id: "crazyflie/base_link"
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 0.0
orientation_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
x: 0.19092607986844295
y: -0.3503276561233455
z: -0.2344841101570201
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration:
x: -4.1360481646656995
y: -5.849141725301743
z: 6.052768086791039
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
- 使用话题,控制crazyflie的螺旋桨叶旋转
rostopic pub -r 50 /crazyflie/cmd_vel geometry_msgs/Twist "linear:
x: 0.0
y: 0.0
z: 40000.0
angular:
x: 0.0
y: 0.0
z: 0.0"
- 可以看到crazyflie的螺旋桨叶旋转
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号