ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.18k stars 16.76k forks source link

DJI CANBUS Support #3107

Open artemen opened 8 years ago

artemen commented 8 years ago

DJI CANBUS Support will be a great addition to use with DJI gimbals.

earsneyes commented 8 years ago

+1

R-Lefebvre commented 8 years ago

Do we have any info on the protocol? Or is it logic analyzer time?

artemen commented 8 years ago

Should be pretty easy as there are already clones of iosd, pmu and GPS all of which are canhub based.

helvaci commented 8 years ago

There is some people on this page makes a progress: http://www.rcgroups.com/forums/showthread.php?t=2071772 It will be cool but i think it will be add visibly load to processor.

EShamaev commented 7 years ago

Is this still actual? If the hardware can be provided, I can take over to implement the feature.

rmackay9 commented 7 years ago

Yes, I think it's still valid. I think ardupilot would provide funding for the hardware if someone can point out which hardware would be good.

proficnc commented 7 years ago

I would suggest an M600 It would be a great demo platform, with a cube!

auturgy commented 6 years ago

Cross linking to dapo https://discuss.ardupilot.org/t/code-bounty-for-dji-canbus/22813/9

geofrancis commented 6 years ago

You should check out cosmostreamer it's basically using a pi to interface with an inspire1 camera/gimbal

jasin755 commented 4 years ago

+1 Controlling Ronin MX is best usage of CAN bus on Ardupilot

alxbouchard commented 3 years ago

There's a new SDK for the Ronin R series with communication and control over CAN BUS: https://terra-1-g.djicdn.com/851d20f7b9f64838a34cd02351370894/DJI%20R%20SDK/DJI_R_SDK.zip

Screen Shot 2020-11-20 at 2 04 39 PM
Wodie commented 3 years ago

I been debugging data frames from Ronin S, is anyone working with it? At the moment I am only missing the 16 bit CRC to have it working.

ayi-afk commented 3 years ago

I tried to do all like in doc :( but nothing happens, even sending the example packet from SDK doc doesn't work ... any1 got it working over CAN?

ceinem commented 3 years ago

@ayi-afk same for me, didn't get any movements or reactions at all from the gimbal over the new SDK. Did anyone have any luck?

reallycoyote commented 2 years ago

have you looked at the sdk documentation for commands and are you using it in conjunction with the focus wheel? i read that no data is sent unless an accessory is attached. https://usermanual.wiki/m/35b7e4af8653ff4d7d14e5d9ec3ced9e3e085a0d1ffcab964db6bc053ecd0aaf.pdf

ceinem commented 2 years ago

I got it working at some point for the RS2, wrote a minimal ROS integration which you can find here

reallycoyote commented 2 years ago

cool great. i'll look into it. just out of curiosity, were you able to read from the gimbal as well such as position speed etc. or only send? I'm working on something to log and replay for motion control.

ceinem commented 2 years ago

I was also able to read the data, at least position. I'm not sure about speed, I would have to look into the code again. The code is heavily based on ROS and ROS-CAN integrations, but during development I also had it working with python-can and without any ROS integrations, so should be easy to adapt. Error correction and those things are heavily based on the sample SDK code of DJI.

reallycoyote commented 2 years ago

thanks! this is giving me lots of hope for py-can/can-utils

arcusfelis commented 2 years ago

Hi, nice project. @ceinem is it possible to control follow focus motor using CAN?

ceinem commented 2 years ago

with the code I have implemented so far: no. In general: maybe? you will have to look through the rSDK documentation and see if there are some specified commands for that. If yes, then it is easy to implement.

arcusfelis commented 2 years ago

@ceinem yea, there are documented commands (I am surprised, actually).

https://usermanual.wiki/m/35b7e4af8653ff4d7d14e5d9ec3ced9e3e085a0d1ffcab964db6bc053ecd0aaf.pdf Section 2.3.4.19 Focus Motor Control Command

It is "rotate to absolute position". Sad, there is no rotate by one step of the stepper motor (And I am not surprised, actually, because of how poor the api is). I am wondering how absolute positions work without calibration now (time to get an arduino and do some coding I guess).

ceinem commented 2 years ago

Oh, interesting. I still had an older version of the document without that command. Yeah, the api is quite poor. Maybe the focus motor position is reported with all the position and speed status messages? I don't have a focus motor, so I can't test that unfortunately.

arcusfelis commented 2 years ago

yea, I have to sniff what the wheel is sending when I move it (something says it sends relative move, not absolute).

ceinem commented 2 years ago

hm, do you mean the communication between wheel and gimbal? Maybe that's s-bus and not CAN, then it would probably only be relative.

reallycoyote commented 2 years ago

prototyping this now

reallycoyote commented 1 year ago

I'm about to do more heavy prototyping on this but I am waiting on some pieces. I was wondering did anyone log or sniff the can bus without sending commands and doing some movements on the gimbal? If not can you? What is the result like?

On Mon, May 16, 2022, 22:27 Cornelius @.***> wrote:

hm, do you mean the communication between wheel and gimbal? Maybe that's s-bus and not CAN, then it would probably only be relative.

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1128103532, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYB6XRXQ7GWVPC4Q4TTVKKVTRANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

arcusfelis commented 1 year ago

Yea, managed to make canbus working with Arduino and a canbus shield, some c coding is required to assemble all packages and build them.

The API is very limited though. You can see communication of the wheel on the bus, but that is about it. And the communication of the wheel is not documented.

There are also some packages flying around on the bus, undocumented. Everything else you cannot trace because it is send on a separate bus internally.

I think sniffing will not help much because packages I've seen use custom checksums which is not easy to reverse engineer.

So, yea, only canbus commands from that SDK API are available to work with.

On Sat, 24 Sep 2022, 19:10 reallycoyote, @.***> wrote:

I'm about to do more heavy prototyping on this but I am waiting on some pieces. I was wondering did anyone log or sniff the can bus without sending commands and doing some movements on the gimbal? If not can you? What is the result like?

On Mon, May 16, 2022, 22:27 Cornelius @.***> wrote:

hm, do you mean the communication between wheel and gimbal? Maybe that's s-bus and not CAN, then it would probably only be relative.

— Reply to this email directly, view it on GitHub < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1128103532 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AYSMNYB6XRXQ7GWVPC4Q4TTVKKVTRANCNFSM4BTFUIAA

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257019385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE4GNHFHQJGPVXMYONODRTV74YYRANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

reallycoyote commented 1 year ago

I have this theory I want to test but as I said I'm waiting for my parts. Is it possible to run python-can logging and then use force mobile on a phone to move the gimbal around panning and tilting. Then stop the logging and then replay the log over the canbus to hopefully replay the same movement?

On Sun, Sep 25, 2022, 00:09 Michael Uvarov @.***> wrote:

Yea, managed to make canbus working with Arduino and a canbus shield, some c coding is required to assemble all packages and build them.

The API is very limited though. You can see communication of the wheel on the bus, but that is about it. And the communication of the wheel is not documented.

There are also some packages flying around on the bus, undocumented. Everything else you cannot trace because it is send on a separate bus internally.

I think sniffing will not help much because packages I've seen use custom checksums which is not easy to reverse engineer.

So, yea, only canbus commands from that SDK API are available to work with.

On Sat, 24 Sep 2022, 19:10 reallycoyote, @.***> wrote:

I'm about to do more heavy prototyping on this but I am waiting on some pieces. I was wondering did anyone log or sniff the can bus without sending commands and doing some movements on the gimbal? If not can you? What is the result like?

On Mon, May 16, 2022, 22:27 Cornelius @.***> wrote:

hm, do you mean the communication between wheel and gimbal? Maybe that's s-bus and not CAN, then it would probably only be relative.

— Reply to this email directly, view it on GitHub <

https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1128103532

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AYSMNYB6XRXQ7GWVPC4Q4TTVKKVTRANCNFSM4BTFUIAA

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257019385 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAE4GNHFHQJGPVXMYONODRTV74YYRANCNFSM4BTFUIAA

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257073146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYHL4GQV6CBTXPUBYH3V753XVANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

arcusfelis commented 1 year ago

you can query for gimbal position using SDK API. Query often enough and you will record the position changes.

- Handheld Gimbal Information Obtaining
Reply frame
2 2 yaw int16_t yaw axis angle (unit: 0.1°)
4 2 roll int16_t roll axis angle (unit: 0.1°)
6 2 pitch int16_t pitch axis angle (unit: 0.1°)

and after you can set the values back.

You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work.

reallycoyote commented 1 year ago

Gotcha. I am looking at Bluetooth log replay now as well

On Sun, Sep 25, 2022, 18:05 Michael Uvarov @.***> wrote:

you can query for gimbal position using SDK API.

  • Handheld Gimbal Information Obtaining

Reply frame

2 2 yaw int16_t yaw axis angle (unit: 0.1°)

4 2 roll int16_t roll axis angle (unit: 0.1°)

6 2 pitch int16_t pitch axis angle (unit: 0.1°)

and after you can set the values back.

You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work.

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257224761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

rmackay9 commented 1 year ago

Some updates on this

inspired27 commented 1 year ago

Gotcha. I am looking at Bluetooth log replay now as well

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

reallycoyote commented 1 year ago

Hello friends Cornelius and I and another have written a simple python control script - movement and focus we will release it at Christmas 🎄⛄🎅 on git

I posted on Reddit and dji forums so you can follow the updates. I'm resting after putting it through the battlefield and cleaning up the code. Talk to you soon xR

https://www.reddit.com/r/dji/comments/z54qjd/myself_and_collaborators_have_successfully/

On Fri, Nov 18, 2022, 14:12 crazyfrog-github @.***> wrote:

Gotcha. I am looking at Bluetooth log replay now as well … <#m_2758728158447306755_m3994457677553358996> On Sun, Sep 25, 2022, 18:05 Michael Uvarov @.> wrote: you can query for gimbal position using SDK API. - Handheld Gimbal Information Obtaining Reply frame 2 2 yaw int16_t yaw axis angle (unit: 0.1°) 4 2 roll int16_t roll axis angle (unit: 0.1°) 6 2 pitch int16_t pitch axis angle (unit: 0.1°) and after you can set the values back. You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work. — Reply to this email directly, view it on GitHub <#3107 (comment) https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257224761>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.>

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down using a Bluetooth sniffer and Wireshark in between the DJI Assist app on an Android phone and RS2 to identify the service and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1319978406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYFYLNQYKRZ5R5NWXQLWI56EVANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

inspired27 commented 1 year ago

Hey,

Looks good, I assume your code can move the DJI RS2 gimbal faster with pan motion than in the video which is more like Tai Chi than King Fu?

Thanks

Paul

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: reallycoyote @.> Sent: Saturday, November 26, 2022 10:35:30 PM To: ArduPilot/ardupilot @.> Cc: crazyfrog-github @.>; Comment @.> Subject: Re: [ArduPilot/ardupilot] DJI CANBUS Support (#3107)

Hello friends Cornelius and I and another have written a simple python control script - movement and focus we will release it at Christmas 🎄⛄🎅 on git

I posted on Reddit and dji forums so you can follow the updates. I'm resting after putting it through the battlefield and cleaning up the code. Talk to you soon xR

https://www.reddit.com/r/dji/comments/z54qjd/myself_and_collaborators_have_successfully/

On Fri, Nov 18, 2022, 14:12 crazyfrog-github @.***> wrote:

Gotcha. I am looking at Bluetooth log replay now as well … <#m_2758728158447306755_m3994457677553358996> On Sun, Sep 25, 2022, 18:05 Michael Uvarov @.> wrote: you can query for gimbal position using SDK API. - Handheld Gimbal Information Obtaining Reply frame 2 2 yaw int16_t yaw axis angle (unit: 0.1°) 4 2 roll int16_t roll axis angle (unit: 0.1°) 6 2 pitch int16_t pitch axis angle (unit: 0.1°) and after you can set the values back. You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work. — Reply to this email directly, view it on GitHub <#3107 (comment) https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257224761>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.>

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down using a Bluetooth sniffer and Wireshark in between the DJI Assist app on an Android phone and RS2 to identify the service and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1319978406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYFYLNQYKRZ5R5NWXQLWI56EVANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328038764, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AICL2BMRCCABAVP4AQLFR2LWKH7ZFANCNFSM4BTFUIAA. You are receiving this because you commented.Message ID: @.***>

reallycoyote commented 1 year ago

find out for yourself in a month

On Sat, Nov 26, 2022 at 2:24 PM crazyfrog-github @.***> wrote:

Hey,

Looks good, I assume your code can move the DJI RS2 gimbal faster with pan motion than in the video which is more like Tai Chi than King Fu?

Thanks

Paul

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: reallycoyote @.> Sent: Saturday, November 26, 2022 10:35:30 PM To: ArduPilot/ardupilot @.> Cc: crazyfrog-github @.>; Comment @.> Subject: Re: [ArduPilot/ardupilot] DJI CANBUS Support (#3107)

Hello friends Cornelius and I and another have written a simple python control script - movement and focus we will release it at Christmas 🎄⛄🎅 on git

I posted on Reddit and dji forums so you can follow the updates. I'm resting after putting it through the battlefield and cleaning up the code. Talk to you soon xR

https://www.reddit.com/r/dji/comments/z54qjd/myself_and_collaborators_have_successfully/

On Fri, Nov 18, 2022, 14:12 crazyfrog-github @.***> wrote:

Gotcha. I am looking at Bluetooth log replay now as well … <#m_2758728158447306755_m3994457677553358996> On Sun, Sep 25, 2022, 18:05 Michael Uvarov @.*> wrote: you can query for gimbal position using SDK API. - Handheld Gimbal Information Obtaining Reply frame 2 2 yaw int16_t yaw axis angle (unit: 0.1°) 4 2 roll int16_t roll axis angle (unit: 0.1°) 6 2 pitch int16_t pitch axis angle (unit: 0.1°) and after you can set the values back. You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work. — Reply to this email directly, view it on GitHub <#3107 (comment) < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257224761>>,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA < https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.*>

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down using a Bluetooth sniffer and Wireshark in between the DJI Assist app on an Android phone and RS2 to identify the service and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

— Reply to this email directly, view it on GitHub < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1319978406>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AYSMNYFYLNQYKRZ5R5NWXQLWI56EVANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328038764>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AICL2BMRCCABAVP4AQLFR2LWKH7ZFANCNFSM4BTFUIAA>.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328046118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYB2KPOBGYAJ3IIQYBLWKIFSFANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

inspired27 commented 1 year ago

Okay thanks, looking forward to the big reveal.

From: reallycoyote @.> Sent: Sunday, 27 November 2022 12:01 AM To: ArduPilot/ardupilot @.> Cc: crazyfrog-github @.>; Comment @.> Subject: Re: [ArduPilot/ardupilot] DJI CANBUS Support (#3107)

find out for yourself in a month

On Sat, Nov 26, 2022 at 2:24 PM crazyfrog-github @.<mailto:@.>> wrote:

Hey,

Looks good, I assume your code can move the DJI RS2 gimbal faster with pan motion than in the video which is more like Tai Chi than King Fu?

Thanks

Paul

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: reallycoyote @.<mailto:@.>> Sent: Saturday, November 26, 2022 10:35:30 PM To: ArduPilot/ardupilot @.<mailto:@.>> Cc: crazyfrog-github @.<mailto:@.>>; Comment @.<mailto:@.>> Subject: Re: [ArduPilot/ardupilot] DJI CANBUS Support (#3107)

Hello friends Cornelius and I and another have written a simple python control script - movement and focus we will release it at Christmas 🎄⛄🎅 on git

I posted on Reddit and dji forums so you can follow the updates. I'm resting after putting it through the battlefield and cleaning up the code. Talk to you soon xR

https://www.reddit.com/r/dji/comments/z54qjd/myself_and_collaborators_have_successfully/

On Fri, Nov 18, 2022, 14:12 crazyfrog-github @.<mailto:@.>> wrote:

Gotcha. I am looking at Bluetooth log replay now as well … <#m_2758728158447306755_m3994457677553358996> On Sun, Sep 25, 2022, 18:05 Michael Uvarov @.<mailto:@.>> wrote: you can query for gimbal position using SDK API. - Handheld Gimbal Information Obtaining Reply frame 2 2 yaw int16_t yaw axis angle (unit: 0.1°) 4 2 roll int16_t roll axis angle (unit: 0.1°) 6 2 pitch int16_t pitch axis angle (unit: 0.1°) and after you can set the values back. You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work. — Reply to this email directly, view it on GitHub <#3107 (comment) < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257224761>>,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA < https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.*>

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down using a Bluetooth sniffer and Wireshark in between the DJI Assist app on an Android phone and RS2 to identify the service and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

— Reply to this email directly, view it on GitHub < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1319978406>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AYSMNYFYLNQYKRZ5R5NWXQLWI56EVANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.<mailto:@.>>

— Reply to this email directly, view it on GitHub< https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328038764>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AICL2BMRCCABAVP4AQLFR2LWKH7ZFANCNFSM4BTFUIAA>.

You are receiving this because you commented.Message ID: @.<mailto:@.>>

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328046118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYB2KPOBGYAJ3IIQYBLWKIFSFANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.<mailto:@.>>

— Reply to this email directly, view it on GitHubhttps://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328051796, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AICL2BLYJPTIEFRPSBYCRF3WKIJ2VANCNFSM4BTFUIAA. You are receiving this because you commented.Message ID: @.**@.>>

reallycoyote commented 1 year ago

merry christmas

https://github.com/rileycoyote87/DJI-Ronin-RS2-Log-and-Replay/ https://www.reddit.com/r/dji/com ... _have_successfully/ https://www.reddit.com/r/dji/comments/z54qjd/myself_and_collaborators_have_successfully/

ho ho ho

On Sun, Nov 27, 2022 at 12:43 AM crazyfrog-github @.***> wrote:

Okay thanks, looking forward to the big reveal.

From: reallycoyote @.> Sent: Sunday, 27 November 2022 12:01 AM To: ArduPilot/ardupilot @.> Cc: crazyfrog-github @.>; Comment @.> Subject: Re: [ArduPilot/ardupilot] DJI CANBUS Support (#3107)

find out for yourself in a month

On Sat, Nov 26, 2022 at 2:24 PM crazyfrog-github @.<mailto:@.>>

wrote:

Hey,

Looks good, I assume your code can move the DJI RS2 gimbal faster with pan motion than in the video which is more like Tai Chi than King Fu?

Thanks

Paul

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: reallycoyote @.<mailto:@.>> Sent: Saturday, November 26, 2022 10:35:30 PM To: ArduPilot/ardupilot @.<mailto:@.>> Cc: crazyfrog-github @.<mailto:@.>>; Comment @.<mailto:@.>> Subject: Re: [ArduPilot/ardupilot] DJI CANBUS Support (#3107)

Hello friends Cornelius and I and another have written a simple python control script - movement and focus we will release it at Christmas 🎄⛄🎅 on git

I posted on Reddit and dji forums so you can follow the updates. I'm resting after putting it through the battlefield and cleaning up the code. Talk to you soon xR

https://www.reddit.com/r/dji/comments/z54qjd/myself_and_collaborators_have_successfully/

On Fri, Nov 18, 2022, 14:12 crazyfrog-github @.<mailto:@.>>

wrote:

Gotcha. I am looking at Bluetooth log replay now as well … <#m_2758728158447306755_m3994457677553358996> On Sun, Sep 25, 2022, 18:05 Michael Uvarov @.<mailto:@.>> wrote: you can query for gimbal position using SDK API. - Handheld Gimbal Information Obtaining Reply frame 2 2 yaw int16_t yaw axis angle (unit: 0.1°) 4 2 roll int16_t roll axis angle (unit: 0.1°) 6 2 pitch int16_t pitch axis angle (unit: 0.1°) and after you can set the values back. You will not see anything on a bus, because force mobile and gimbal operations are communicated on the internal bus, not the one you can connect to. So yea, replay would not work. — Reply to this email directly, view it on GitHub <#3107 (comment) <

https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1257224761>>,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA

<

https://github.com/notifications/unsubscribe-auth/AYSMNYFWBEA4L7HFEMWKVZTWABZ4RANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.*>

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down using a Bluetooth sniffer and Wireshark in between the DJI Assist app on an Android phone and RS2 to identify the service and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

— Reply to this email directly, view it on GitHub <

https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1319978406>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AYSMNYFYLNQYKRZ5R5NWXQLWI56EVANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.<mailto:@.>>

— Reply to this email directly, view it on GitHub<

https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328038764>,

or unsubscribe<

https://github.com/notifications/unsubscribe-auth/AICL2BMRCCABAVP4AQLFR2LWKH7ZFANCNFSM4BTFUIAA>.

You are receiving this because you commented.Message ID: @.<mailto:@.>>

— Reply to this email directly, view it on GitHub < https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328046118>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AYSMNYB2KPOBGYAJ3IIQYBLWKIFSFANCNFSM4BTFUIAA>

. You are receiving this because you commented.Message ID: @.<mailto:@.>>

— Reply to this email directly, view it on GitHub< https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328051796>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AICL2BLYJPTIEFRPSBYCRF3WKIJ2VANCNFSM4BTFUIAA>.

You are receiving this because you commented.Message ID: @.**@.>>

— Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot/issues/3107#issuecomment-1328133352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSMNYBX5KJOI63J26MMSTTWKKOANANCNFSM4BTFUIAA . You are receiving this because you commented.Message ID: @.***>

rmackay9 commented 1 year ago

Support for the DJI RS2/RS3 Pro gimbals is in "latest" and will be released with 4.4.0 which should start beta testing within a couple of weeks.

We've also got a wiki page here which describes the setup and configuration

electricpocket commented 1 year ago

Gotcha. I am looking at Bluetooth log replay now as well

Hi,

I am trying to control the RS2 Gimbal exactly like the DJI Assist app with Force Mobile via Bluetooth.

https://www.youtube.com/watch?v=0CQ4LSb0Evw

The RS2 Gimbal has one Bluetooth service 0000fff5 which receives and executes the command, I want to send continual write commands to control the movement of gimbal. I managed to find the UUID that performs a recentre and what makes it go to the right, left, up and down and the UUID or hex being sent to the RS2.

Device Service:

WRITEABLE WITHOUT RESPONSE service UUID (0000fff5-0000-1000-8000-00805f9b34fb)

I was wondering if you would help me discover if there is a correlation between the DJI R SDK Protocol and User Interface hex commands and if they are sent by the DJI Assist App via Bluetooth service above to the RS2 to control it.

You have experience via the CANBus side of things and thought you could help shed some light here.

Hi, have you made any more progress on discovering the Bluetooth services and properties to control the RS2? I have an RS3 Mini and would be interested in helping getting Bluetooth remote control working so I can program it