px4_ros_com icon indicating copy to clipboard operation
px4_ros_com copied to clipboard

The c++ offboard example is not support the latest microdds version.

Open JetJie opened this issue 3 years ago • 4 comments

IThe c++ offboard example is not support the latest microdds version. Is there any update on the offboard control example?

JetJie avatar Nov 11 '22 15:11 JetJie

Take a look at https://github.com/Jaeyoung-Lim/px4-offboard.

At this point with microdds I'm not sure if we should keep px4_ros_com or just get it split up into separate standalone examples we can refer to.

dagar avatar Nov 11 '22 16:11 dagar

Ok, I know that, but it is a python example. I need a cpp offboard node to use my previous cpp-based project.

JetJie avatar Nov 14 '22 17:11 JetJie

I got a QoS error when I was running offboard_control. After making the following changes in the code, it can run normally

                rclcpp::QoS qos(10);
		qos.best_effort();
		qos.transient_local();
		offboard_control_mode_publisher_ = this->create_publisher<OffboardControlMode>("/fmu/in/offboard_control_mode", qos);
		trajectory_setpoint_publisher_ = this->create_publisher<TrajectorySetpoint>("/fmu/in/trajectory_setpoint", qos);
		vehicle_command_publisher_ = this->create_publisher<VehicleCommand>("/fmu/in/vehicle_command", qos);

laylow13 avatar Nov 17 '22 11:11 laylow13

@laylow13 Could you share me the whole code? Obviously, you add qos snippet in the cpp example. Thanks in advance.

JetJie avatar Nov 17 '22 19:11 JetJie