3DR X8+ | DroneKit | Vision System | Part 2

Hello diydrones community :)

3689664127?profile=originalFor those who are interested:  Part 1.

It has been 3 weeks now since I published my first blog post.

Among other things I introduced a first version of a 3D printed camera mounting for the Logitech C920.

Unfortunately, I had to learn that I haven't planned this through very well.

I didn't take into consideration that vibrations might be an issue. But as you can see on the left they are apparently.

3689664155?profile=originalAs a consequence, I scrapped the old design and made a new one. Now, the mounting is sitting on four little rubber dampers. Thus, all vibrations will be filtered.

The result is much better now.

A close-up of the new mounting can be seen below.

3689664141?profile=original

So much for that. :)

I do also have a questions though.

I have been trying to correct the drones position to hover over my target (fluorescent orange cirlce) using the information collected through the vision system.

The function that I'd like to use is the send_ned_velocity() function (documentation). However, my drone is just not reacting to the commands I'm sending. Alternatively, I have also tried the goto_position_target_local_ned() function (documentation), but with the same result: My drone does not move. Any ideas why?

I would appreciate any feedback and advice!

Regards,

drohnebohne

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • I updated the FW on my X8 to Copter-3.3-rc9.

    Unfortunately I couldn't test it yet because the Floridian weather is not very drone friendly these days (possible hurricane on Monday). But as soon as it clears up my drone and I will be out on the field again :)

  • Developer

    The NED message is not supported in 3.2 https://github.com/diydrones/ardupilot/blob/ArduCopter-3.2.1/ArduCo... It's a 3.3 feature. You can determine this as when you send the command it returns MAV_RESULT_UNSUPPORTED error code.

  • SITL: Copter-3.3-rc1

    X8+: Copter-3.2.1 so far

    I guess I'll just try using Copter-3.3-rc9 on my X8.

    I'll keep you updated. Thanks for your help! :)

  • Developer

    What version of the FW are you running on SITL and the Version on the X8? You should post logs then we can say for sure most likely what is happening.

    You could look at the ACK code as well from the set command as well, as that will report if the command failed to be recognized

  • @Bill:

    I have to admit that I'm still a 'Padawan' and that I simply don't know how to use the source.

    However, I tried changing the sys_id and the component id. Unfortunately, with no results.

    To narrow the problem down I wrote a rather simple python script that is only using the send_ned_velocity() function to perform something like this:

    [...]

            print("GOING UP")
            send_ned_velocity(0, 0, UP)
            time.sleep(2)
            send_ned_velocity(0, 0, 0)
            time.sleep(1)
            
            print("GOING DOWN")
            send_ned_velocity(0, 0, DOWN)
            time.sleep(2)
            send_ned_velocity(0, 0, 0)       
            time.sleep(1)

    [...]

    With UP = -1 and DOWN = 1.

    The code works in the simulation (SITL), but in real life my drone still does not move.

  • @bill

    I like that. I am going to use that from now on!

    @Bim

    Guided mode requires GPS, even when using velocity commands. There may be a feature in the future which will allow the copter to be controller using tilt angles. That will not require GPS. Not sure if that is going to make it into Copter 3.3

  • If we're on the topic, does GUIDED mode requires GPS?

    Is it possible to use this command without GPS (Using body frame, not NED of course)?

  • Developer

    As one infamous programmer said in a galaxy far far away - "Use the source, Luke"

    https://github.com/diydrones/ardupilot/blob/master/ArduCopter/GCS_M...

    You can also check the return value of the command to see if the commands was accepted. I'd also suggest setting the correct sys_id (probably 1) and (component id =1), since otherwise the command would be sent to all connected devices on a the link (and that is not what you intend)

  • The copter arms, takes off, and operates in GUIDED mode.

    So this can't be the issue.

  • Make sure you are in guided mode
This reply was deleted.