locked
How to manipulate Eddie with Obstacle Avoidance in VPL? RRS feed

  • Question

  • Hi everyone!

    I have to set up Eddie to autonomously drive thru his environment.
    How can I set up the VPL-objects "obstacle avoidance drive" and "ReferencePlattformIOController" to solve this problem?

    At the moment I have build VPL-code with IR- and Ping-sensors influencing the IOController.
    I want to integrate the "obstacle avoidance drive"-object into this setting to additionally have the Kinect view for avoiding obstacles.

    Any ideas?

    Greetings from Germany, Chris

    Thursday, October 17, 2013 10:01 AM

Answers

  • Values are in millimeters.

    But with older Kinect SDKs it's a bit more complicated than that. You may need to right-shift the values 3 bits because of the player index, depending on your settings.

    I would suggest taking a look at the Kinect service itself and the KinectUI sample (both in samples\Sensors\Kinect). Also note that this service is not wrapping the very latest Kinect SDK (see the last bullet of the FAQ). I notice you mention Near Mode, which isn't supported.

    If you're really ambitious, you could update the service for the latest SDK. The depth values you get then are more sane; taking care of player index and all that for you.

    I seriously doubt you'll be able to implement obstacle avoidance in pure VPL. You simply lack the primitive operations needed. I would suggest making a regular service and *using* that from VPL. You could start by looking at samples\Misc\ObstacleAvoidance.



    Friday, November 8, 2013 6:40 PM
    Moderator

All replies

  • Hi, I would highly recommend not using built-in obstacle avoidance drive, and instead developing your own, something as simple as "if there is an obstacle on the right, turn left, if there is an obstacle on the left turn right" would be fun to develop, faster to integrate, and would work just as well. You would also be able to understand how it works, and tweak the logic to achieve the behavior you need - something you wont be able to do with built-in obstacle avoidance drive.

    Also, avoid using VPL for anything destined to be more than trivial. It will seriously impede your ability to make progress as soon as your app grows.

    • Proposed as answer by Greg ShirakyanModerator Tuesday, October 22, 2013 1:58 AM
    • Unproposed as answer by cr1zzo Wednesday, October 23, 2013 12:39 PM
    Tuesday, October 22, 2013 1:58 AM
    Moderator
  • Thanks for your reply Greg.

    Unfortunately I have to use VPL, that's my task. 

    So my problem, for building my own obstacle avoidance, is how to get the information "there is an obstacle" out of the Kinect-object.

    Tuesday, October 22, 2013 9:00 AM
  • Just process the depth frame that comes out of Kinect, walk the depth frame (depth frame is an array of short integers) and whenever you see a value that's close than, say 60cm, turn in the oppostie direction until obstacle clears.

    Monday, October 28, 2013 9:45 AM
    Moderator
  • Ah okay... I think I get it.

    But which integer comes up to e.g. 60 cm? Is it 600 or is there a calculation with 0 - 2^16(for short integer) representing 0.4m - 3m(for Near Mode)?

    Thanks a lot for your replies Greg!!!

    Wednesday, November 6, 2013 12:08 PM
  • Values are in millimeters.

    But with older Kinect SDKs it's a bit more complicated than that. You may need to right-shift the values 3 bits because of the player index, depending on your settings.

    I would suggest taking a look at the Kinect service itself and the KinectUI sample (both in samples\Sensors\Kinect). Also note that this service is not wrapping the very latest Kinect SDK (see the last bullet of the FAQ). I notice you mention Near Mode, which isn't supported.

    If you're really ambitious, you could update the service for the latest SDK. The depth values you get then are more sane; taking care of player index and all that for you.

    I seriously doubt you'll be able to implement obstacle avoidance in pure VPL. You simply lack the primitive operations needed. I would suggest making a regular service and *using* that from VPL. You could start by looking at samples\Misc\ObstacleAvoidance.



    Friday, November 8, 2013 6:40 PM
    Moderator
  • Thanks for the reply Ashley!

    I'm using the SDK 1.7 so that's not a problem, is it? But is bitshifting possible within the calculate-object in VPL?

    Unfortunately I have to use VPL and also I'm a total noob in programming C# :D

    Is Near Mode absolutely not supported by VPL or the older SDKs?

    Thanks in advance for your help!!


    • Edited by cr1zzo Tuesday, November 12, 2013 9:43 AM
    Tuesday, November 12, 2013 9:42 AM
  • See here the link below for instructions on using RDS with Kinect for Windows  SDK 1.6.  These should work for 1.7 as well.  Note you will need to use the ".user" version of the Kinect service.

    http://social.msdn.microsoft.com/Forums/en-US/2a09e735-3a86-4c3d-aa4d-ed7e51a2dbce/rds4-kinect-service-does-not-build-with-kinect-for-windows-sdk-16-fix-available?forum=roboticscommunity

    This service does not support near mode (though it should be able to be extended to do so).

    I do not think you need to bit shift the depth values with the newer versions of the SDK.

    Bryan

    Thursday, November 14, 2013 2:08 AM
    Moderator