Storm32 gimbal integration update

760 views
Skip to first unread message

Randy Mackay

unread,
Mar 20, 2015, 7:53:18ā€ÆAM3/20/15
to OlliW, Luƭs Vale GonƧalves, drones-...@googlegroups.com

OlliW, Luis,

Ā 

Ā Ā Ā Ā Ā  I got the storm32 gimbal working today with master!

Ā 

Ā Ā Ā Ā  To get it working I needed to:

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  connect the gimbalā€™s UART to Telem2

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  set SERIAL2_BAUD to ā€œ115ā€

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  set MNT_TYPE to ā€œ4ā€ and reboot the Pixhawk

Ā 

Ā Ā Ā Ā  I managed to control any of the 3 axis of the camera using using knobs on the transmitter (ardupilotā€™s mount library converts these to mavlink messages and sends down to the gimbal), and was partially successful at getting ROI (region of interest = point camera at a lat,lon,alt location) working.

Ā 

Ā Ā Ā Ā  Some issues I found were:

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  if arducopter sends COMMAND_LONG messages at more than 10 hz the gimbal cannot keep up and itā€™s response slows as it seems to buffer messages.Ā  Iā€™ve slowed the update to 10hz.

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  tilt and yaw angle response seems reversed with pitch=-45 pointing up when it should point down and yaw +45 rotating left instead of right.Ā  Iā€™ve fixed this in the arducopter driver but I can switch it back if OlliW decides to reverse it on his side instead (which would probably be best)

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  providing yaw angle of 180deg correctly made the gimbal point backwards but providing -180 would make it spin around too far by 90deg.

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  the gimbal seems to be sending ACK messages with sysid = -1, compid = -1 (although this appeared as 4294967295) instead of using its own sysid,compid (i.e. 71, 67).Ā  We donā€™t look at the ACKs anyway but probably best to fix this.

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  If connecting through the o323BGCTool with mavlink heartbeats enabled it loses connection after about 10seconds.Ā  This is no big deal except the user must be quick to disable the mavlink heartbeats before attempting making any other config changes (and then must remember to turn it back on again later).

Ā 

Ā Ā Ā Ā  Iā€™ve checked some changes into ardupilot master and these will go out with AC3.3-rc1 (release candidate #1) in the near future. Ā Iā€™m also working on a wiki page to make it clear how to connect the Pixhawk & SToRM gimbal.

Ā 

-Randy

Randy Mackay

unread,
Mar 20, 2015, 9:12:44ā€ÆAM3/20/15
to OlliW, Luƭs Vale GonƧalves, drones-...@googlegroups.com

Ā 

Ā Ā Ā Ā  Hereā€™s the new wiki page.Ā  http://copter.ardupilot.com/wiki/common-storm32-gimbal/

Ā 

Ā Ā Ā Ā  Itā€™s not exhaustive, not trying to recreate OlliWā€™s wiki, I just provided some links and highlight the critical bits that are special to the pixhawk+storm32 setup.

Ā 

-Randy

Craig Elder

unread,
Mar 20, 2015, 1:36:07ā€ÆPM3/20/15
to drones-discuss, OlliW, Luƭs Vale GonƧalves
Thanks Randy and Olli.Ā  That is looking great.

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Randy Mackay

unread,
Mar 20, 2015, 5:03:41ā€ÆPM3/20/15
to drones-...@googlegroups.com, OlliW, Luƭs Vale GonƧalves

Ā 

Luis mentioned that I was using an old version so Iā€™ve re-tested with the latest SToRM32 firmware (v0.67e) and it fixes these issues mentioned earlier:

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  if arducopter sends COMMAND_LONG messages at more than 10 hz the gimbal cannot keep up -- FIXED

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  If connecting through the o323BGCTool with mavlink heartbeats enabled it loses connection after about 10seconds -- FIXED

Ā 

These remain:

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  tilt and yaw angle response seems reversed with pitch=-45 pointing up when it should point down and yaw +45 rotating left instead of right (temporarily fixed in arducopter).

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  yaw angle seems incorrect.Ā  Providing 180deg makes the copter move to 270.

Ā·Ā Ā Ā Ā Ā Ā Ā Ā  the gimbal seems to be sending ACK messages with sysid = -1, compid = -1 Ā instead of using its own sysid,compid (i.e. 71, 67).

Ā 

.. This testing uncovered an existing bug in the mount code in which ROI for 3-axis gimbals was using absolute headings instead of relative.Ā  With this fixed ROI now seems to work for SToRM (except for the yaw angle issue mentioned above).

Ā 

By the way, when doing ROI with this mount and a 3-axis gimbal do we want the copter to point at the target or should it just let the gimbal do all the rotation?Ā  I think we still want the vehicle to rotate so the gimbal will simply take out any yaw shakes.Ā  People agree?

Ā 

-Randy

Luis Vale GonƧalves

unread,
Mar 20, 2015, 6:43:24ā€ÆPM3/20/15
to drones-...@googlegroups.com, oll...@gmail.com, luis...@gmail.com
Hi Randy.

I believe the issue with 3 axis gimbals are:Ā 

angle limits (physical due to the construction of the gimbal)

practical (if a gimbal rotates yaw to a certain angle, do certain parts of the vehicle become visible to the camera, ex: if my gimbal rates yaw 180Āŗ my battery becomes visible at the top of the image, or other cases landing gears may become visible in frame)

We can use the limits on the parameters to avoid both issues above, so that we could use the gimbal yaw limits if the angle desired would fall within the min/max range and if beyond that the vehicle would have to modify its heading to accommodate the angle.Ā 

We could have in consideration the Yaw Pan Deadband before starting to modify the vehicle heading.

To the best of my knowledge no one is using a DJI Inspire with a PixHawk :) that would sort the issue with landing gears :)

Luis Vale GonƧalves

unread,
Mar 20, 2015, 8:39:21ā€ÆPM3/20/15
to drones-...@googlegroups.com, oll...@gmail.com, luis...@gmail.com
HiĀ 

Randy, as you've probably seen on the configuration app, the gimbal might work on different modes for each axis. These are Hold/Pan for each axis, where the Pan setting "follows" the nose (considering that the gimbal's zero is inline with the nose of the vehicle) and Hold maintains the gimbal pointed to the zero point.

I believe we should have this in consideration when sending commands to the gimbal.


On Friday, March 20, 2015 at 11:53:18 AM UTC, Randy Mackay wrote:

אי×Ŗי גיאā€Ž

unread,
Mar 22, 2015, 5:05:32ā€ÆAM3/22/15
to drones-...@googlegroups.com, oll...@gmail.com, luis...@gmail.com
HI Randy ,Ā 

could you please elaborate how the gimbal the mavlink and the pixhawk work together ?

Itay

Oleksandr Chendekov

unread,
Mar 22, 2015, 7:47:25ā€ÆPM3/22/15
to drones-...@googlegroups.com
Randy,

> By the way, when doing ROI with this mount and a 3-axis gimbal do we want the copter to point at the target or should it just let the gimbal do all the rotation? I think we still want the vehicle to rotate so the gimbal will simply take out any yaw shakes. People agree?

If talking about Copter or Trad Heli it's ok, and it may be an option or mode. But if we'll talk about plane we definitely need to yaw with gimbal.


Luis Vale GonƧalves

unread,
Mar 22, 2015, 8:30:44ā€ÆPM3/22/15
to drones-...@googlegroups.com, oll...@gmail.com, luis...@gmail.com
I believe one way to satisfy everybody would be to use the gimbal angle limits and beyond that then adjust the vehicle angles (yaw) to keep the ROI in "view"


On Friday, March 20, 2015 at 11:53:18 AM UTC, Randy Mackay wrote:

Robert Lefebvre

unread,
Mar 23, 2015, 8:45:59ā€ÆAM3/23/15
to drones-discuss
By the way, when doing ROI with this mount and a 3-axis gimbal do we want the copter to point at the target or should it just let the gimbal do all the rotation?Ā  I think we still want the vehicle to rotate so the gimbal will simply take out any yaw shakes.Ā  People agree?

It really depends what you are trying to accomplish.Ā  If you want to satisfy the needs of serious aerial videographers, you absolutely must allow the option for free yaw rotation.Ā  Many use two operators, one to fly the UAV, the other to operate the camera. Perhaps these people would not be expected to use this system, I'm not sure but, this is what they want and need so if you want them using this system, they need that option.Ā 

Jesus Alvarez

unread,
Mar 23, 2015, 12:15:08ā€ÆPM3/23/15
to drones-...@googlegroups.com
We do that (the professional video stufff... )

And we are two operators, pilot (myself) and camera. In those situations, the gimbal is working in "speed" mode, not in position/angle mode.

Luis Vale GonƧalves

unread,
Mar 23, 2015, 12:27:12ā€ÆPM3/23/15
to drones-...@googlegroups.com
@Jesus


Even so, if the gimbal has physical limits, should the controller avoid damage to the gimbal, when trying to set impossible positions ? It doesn't matter if angle or speed setting for the gimbal.

IMHO, when 2 operators are present (assuming also two controllers), usually the vehicle and the gimbal are probably both operating in manual mode, so no need for the "intervention" of the flight controller. Better yet, does the flight controller even need to know there's a gimbal ?

When flying auto modes, then, I believe that the gimbal control can be automated. In the event that the vehicle can be flying auto and the gimbal controlled by a user, then the requests to the gimbal should be routed through the flight controller so that it can adjust it's attitude to better accommodate the gimbal requests.

Doug Walmsley

unread,
Mar 23, 2015, 12:58:54ā€ÆPM3/23/15
to drones-...@googlegroups.com, Robert Lefebvre

I vote yes to that.Ā  However,Ā  once the next point is accepted a slow yaw would be advisable to ensure you don't stress the gimbal to compensate in the event the airframe is pointing aft at the last way point and is now yawing to the next ROI which may be ahead flight path.

Luis Vale GonƧalves

unread,
Mar 24, 2015, 8:58:37ā€ÆPM3/24/15
to drones-...@googlegroups.com, oll...@gmail.com, luis...@gmail.com
Casually I looked at Dronekit-Android and noticed there might be requests to implement functions that we are also discussing here.....




On Friday, March 20, 2015 at 11:53:18 AM UTC, Randy Mackay wrote:
Reply all
Reply to author
Forward
0 new messages