Control gimbal and move the drone with Olympe

Hello.

I’m trying to control gimbal’s yaw axis and move the drone forward using Olympe.
For example, how do you rotate the gimbal’s yaw axis while in a hovering state and then move the drone forward while maintaining that state?
I know I need to unlock the gimbal’s yaw axis, but I don’t understand how specifically.

Regerds,

Hi @Sakaiha,

Take a look at this post.

Regards,
Axel

Hi @Axelm ,

Thank you for your reply.

I checked that post, but how do I send the set_config command in an AirSDK service?
I only know how to use that command in the guidance mode of the sample hello mission.
Please let me know if you have any samples using AirSDK service.

Best Regard,

Hi @Sakaiha,

Your initial question concerned olympe, which is why I redirected you to the topic of my first reply. Olympe cannot be used in an AirSDK mission. You need to use libairsdk’s ControlInterface class to send more or less the same commands as Olympe directly from an Air SDK mission.

Take a look at our Move sample mission or Video and Photo sample missions.

Regards,
Axel

Hi @Axelm ,

I apologize for the misunderstanding.
I aim to operate the gimbal with Olympe set_target command.

The post referenced in the reply says to create an AirSDK service to unlock the gimbal.
Below is the relevant part.

You can’t unlock axes with Olympe.
There is another way to unlock the yaw axes. You can create an Air SDK service (in a mission) and send the set_config command to unlock the yaw.

That’s why I want to know how to unlock the gimbal using Air SDK service because I want to change the angle of the gimbal’s yaw axis with Olympe.

Best Regard,

Hi @Sakaiha,

I apologize for the misunderstanding too.

so, you can’t unlock axes with Olympe and you need an Air SDK service to unlock the gimbal’s yaw axis. To create a new airsdk mission, you need to install our airsdk-cli tool and follow these steps of this section to build and install a mission into the drone.

You need to send the message set_config with Msghub. Take a look at our tracking sample mission using msghub.

Regards,
Axel

Hi @Axelm ,

Thank you for the information.

I’m trying it based on that information, but there are some things I don’t understand.

I would like to know what I need to include to use “Guidance::AxesCamController::Messages::Command”.
How should I change the code below?
: tracking_example tracking_msghub.hpp

...
#include <cv-tracking-service/cv-tracking-service.msghub.h>
#include <cv-tracking-service/cv-tracking-service.pb.h>
...
#define COMPUTER_VISION_TRACKING_MSGHUB_ADD "unix:/tmp/selkie"
...
class TrackingEventHandler
		: public CvTrackingService::Messages::msghub::EventHandler {
...

Sorry, I’m a beginner with AirSDK.

Best Regard,

Hi @Sakaiha,

This is an example to use event handler with AxesCamController:

...
#include <guidance/axes_cam_controller.msghub.h>
#include <guidance/axes_cam_controller.pb.h>
...
#define GUIDANCE_MSGHUB_ADD "unix:/tmp/guidance"
...
class AxesCamControllerEventHandler
		: public Guidance::AxesCamController::Messages::msghub::EventHandler { }
...

Regards,
Axel

Hi @Axelm ,

I’m sorry to bother you again.

What should I set as a dependency in mission.yaml to include the following header?

#include <cv-tracking-service/cv-tracking-service.msghub.h>
#include <cv-tracking-service/cv-tracking-service.pb.h>

Also, where could I find these information?

Best Regard,

Hi @Sakaiha,

You need to add libcv-tracking-service-msghub and libcv-tracking-service-pb

(this is available in the tracking example on github)

Hi @Axelm ,

Thank you for your reply.

I added them and run the airsdk build command.
I get the error below.

fatal error: guidance/axes_cam_controller.msghub.h: No such file or directory
 #include <guidance/axes_cam_controller.msghub.h>

How do I include <cv-tracking-service/cv-tracking-service.msghub.h>, <cv-tracking-service/cv-tracking-service.pb.h>?

Best Regard,

Hi @Sakaiha,

wich package do you want ? <guidance/axes_cam_controller.msghub.h> or <cv-tracking-service/cv-tracking-service.msghub.h> ?

for

#include <cv-tracking-service/cv-tracking-service.msghub.h>
#include <cv-tracking-service/cv-tracking-service.pb.h>

You need to add libcv-tracking-service-msghub and libcv-tracking-service-pb in your mission.yaml file

for

#include <guidance/axes_cam_controller.msghub.h>
#include <guidance/axes_cam_controller.pb.h>

You need to add libguidance-msghub and libguidance-msghub in your mission.yaml file

Regards,
Axel

Hi @Axelm ,

I’m sorry for the confusion.
I posted the wrong question.

This is what I was looking for

#include <guidance/axes_cam_controller.msghub.h>
#include <guidance/axes_cam_controller.pb.h>

You need to add libguidance-msghub and libguidance-msghub in your mission.yaml file

Now that I have resolved the error, thank you.

This topic was automatically closed after 30 days. New replies are no longer allowed.