PX4相关概念

QGroundControl

QGroundControl provides full flight control and vehicle setup for PX4 or ArduPilot powered vehicles. It provides easy and straightforward usage for beginners, while still delivering high end feature support for experienced users.

Key Features:

  • Full setup/configuration of ArduPilot and PX4 Pro powered vehicles.
  • Flight support for vehicles running PX4 and ArduPilot (or any other autopilot that communicates using the MAVLink protocol).
  • Mission planning for autonomous flight.
  • Flight map display showing vehicle position, flight track, waypoints and vehicle instruments.
  • Video streaming with instrument display overlays.
  • Support for managing multiple vehicles.
  • QGC runs on Windows, OS X, Linux platforms, iOS and Android devices.

MAVROS

– MAVLink extendable communication node for ROS with proxy for Ground Control Station.

Avoidance

– 安装方法:https://github.com/PX4/avoidance
– PX4 安装:http://dev.px4.io/en/setup/dev_env_linux_ubuntu.html#common-dependencies
– 仿真调试:http://dev.px4.io/en/simulation/
– Gazebo仿真: http://dev.px4.io/en/simulation/gazebo.html

中文网站:https://px4.osdrone.net/3_Tutorial/telemetry.html

PX4安装与仿真

https://blog.csdn.net/boyhoodme/article/details/96611182 使用了这篇的编译器,以及仿真环境;
https://blog.csdn.net/grand910616/article/details/52089039 这篇关于gcc的解释,需要注意;
https://blog.csdn.net/qq_28773183/article/details/77805133 这篇是根据脚本编译,QT的应用以及uORB自定义app使用;
https://blog.csdn.net/Egean/article/details/79016768
看完这几篇博客基本没问题了。
最后,我是通过kd中打开cmakelist,然后在cmake参数那一栏写入 -G “CodeBlocks - Unix Makefiles”,然后run cmake 就成功了。

Pixhawk整体架构

https://blog.csdn.net/czyv587/article/details/51627787

CollisionPrevention

通过在QGroundControl中设置以下参数来配置防冲突:
MPC_COL_PREV_D - 设置最小允许距离(车辆可以接近障碍物的最近距离)。设置为负以禁用防冲突。
这应该针对期望的最小距离和车辆的可能速度进行调整。
MPC_COL_PREV_ANG - 设置使用收集的传感器数据的角度(指令方向的两侧)。
https://docs.px4.io/master/en/computer_vision/collision_prevention.html 介绍了该功能;

TEST_F(CollisionPreventionTest, testBehaviorOnWithAnObstacle)
{
	// GIVEN: a simple setup condition
	CollisionPrevention cp(nullptr);
	matrix::Vector2f original_setpoint(10, 0);
	float max_speed = 3;
	matrix::Vector2f curr_pos(0, 0);
	matrix::Vector2f curr_vel(2, 0);

	// AND: a parameter handle
	param_t param = param_handle(px4::params::MPC_COL_PREV_D);
	float value = 10; // try to keep 10m distance
	param_set(param, &value);

	// AND: an obstacle message
	obstacle_distance_s message;
	memset(&message, 0xDEAD, sizeof(message));
	message.min_distance = 100;
	message.max_distance = 1000;
	message.timestamp = hrt_absolute_time();
	int distances_array_size = sizeof(message.distances) / sizeof(message.distances[0]);
	message.increment = 360 / distances_array_size;

	for (int i = 0; i < distances_array_size; i++) {
		message.distances[i] = 101;
	}

	orb_advert_t obstacle_distance_pub = orb_advertise(ORB_ID(obstacle_distance), &message);


	// WHEN: we publish the message and set the parameter and then run the setpoint modification
	matrix::Vector2f modified_setpoint = original_setpoint;
	cp.modifySetpoint(modified_setpoint, max_speed, curr_pos, curr_vel);
	orb_unadvertise(obstacle_distance_pub);

	// THEN: it should be cut down a lot
	EXPECT_GT(original_setpoint.norm() * 0.5f, modified_setpoint.norm()); //FIXME: this should actually be constrained to 0
}

你可能感兴趣的:(【无人机】)