Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at the University of Chile. As part of my final degree project, I'm creating a communication API for controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early version. The code is hosted in Smalltalkhub: I also made a video of a test flight, where the AR.Drone is controlled using the API and keyboard: I couldn't find any direct way to use a joystick in Pharo, if someone knows about one, I'd like to integrate it to my code. Development and tests have been done in Pharo 4.0 and ubuntu 12.04 Comments are welcome! Caro |
On 09-04-16 15:24, Carolina Hernández wrote:
> I also made a video of a test flight, where the AR.Drone is controlled > using the API and keyboard: > https://www.youtube.com/watch?v=d8rERiBoD0o Nice! Well done. Stephan |
In reply to this post by Carolina Hernández
Hi Carolina, Thank you for sharing.http://gazebosim.org/ http://wiki.ros.org/tum_simulator 2016-04-09 10:24 GMT-03:00 Carolina Hernández <[hidden email]>:
|
In reply to this post by Carolina Hernández
Beautiful work!
Doru > On Apr 9, 2016, at 6:24 AM, Carolina Hernández <[hidden email]> wrote: > > Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at the University of Chile. > As part of my final degree project, I'm creating a communication API for controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early version. The code is hosted in Smalltalkhub: > http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo > > I also made a video of a test flight, where the AR.Drone is controlled using the API and keyboard: > https://www.youtube.com/watch?v=d8rERiBoD0o > > I couldn't find any direct way to use a joystick in Pharo, if someone knows about one, I'd like to integrate it to my code. > > Development and tests have been done in Pharo 4.0 and ubuntu 12.04 > Comments are welcome! > > Caro -- www.tudorgirba.com www.feenk.com "Every successful trip needs a suitable vehicle." |
In reply to this post by Carolina Hernández
On Sat, Apr 9, 2016 at 9:24 PM, Carolina Hernández <[hidden email]> wrote:
> Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at > the University of Chile. > As part of my final degree project, I'm creating a communication API for > controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early > version. The code is hosted in Smalltalkhub: > http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo > > I also made a video of a test flight, where the AR.Drone is controlled using > the API and keyboard: > https://www.youtube.com/watch?v=d8rERiBoD0o > > I couldn't find any direct way to use a joystick in Pharo, if someone knows > about one, I'd like to integrate it to my code. > > Development and tests have been done in Pharo 4.0 and ubuntu 12.04 > Comments are welcome! > > Caro Very cool. Wish I had a Parrot to try it on. cheers -ben |
In reply to this post by Carolina Hernández
Very interesting and well done. Observations: from a 15 min review. beyond the basics .. which really is well done. Hope I can play with it sometime when I get time.. Love the commandQueue and UDP handling and this block: senderProcess := [[ | nextCommand | "dequeue the next command, enumerate it and send it" nextCommand := commandsQueue next . arDrone commandAdapter send: nextCommand ] repeat ] fork. I like the comments in #sendMoveCommandLeftRightTilt: lrTilt frontBackTilt: fbTilt verticalSpeed: verticalSpeed angularSpeed: angularSpeed But the #initialize method is doing too much in one long method.. check other methods too.. Comments: takeOff "Every 1 second sends the take off command to the drone, until it's state goes from Landed to Flying (ARDState flyMask from 0 to 1)" Either the naming can be keepFlying .. not sure if I want to takeOff every second. Advice avoiding overrides on Integer and Float given its not really needed and you can do that in your own class in the package. viz: #from32BitArrayWithOnesAt: On Sat, Apr 9, 2016 at 8:24 AM, Carolina Hernández <[hidden email]> wrote:
|
In reply to this post by Carolina Hernández
Hi
Good work. Can you tell us more what is the principle to communicate with the Parrot. Stef Le 9/4/16 15:24, Carolina Hernández a écrit : > Hi, my name is Carolina Hernandez and I'm a Computer Engineering > student at the University of Chile. > As part of my final degree project, I'm creating a communication API > for controlling the Parrot AR.Drone 2.0 from Pharo. I've just released > an early version. The code is hosted in Smalltalkhub: > http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo > <http://smalltalkhub.com/#%21/%7ECaroHernandez/ArDronePharo> > > I also made a video of a test flight, where the AR.Drone is controlled > using the API and keyboard: > https://www.youtube.com/watch?v=d8rERiBoD0o > > I couldn't find any direct way to use a joystick in Pharo, if someone > knows about one, I'd like to integrate it to my code. > > Development and tests have been done in Pharo 4.0 and ubuntu 12.04 > Comments are welcome! > > Caro |
In reply to this post by Carolina Hernández
On 09-04-16 15:24, Carolina Hernández wrote:
> I couldn't find any direct way to use a joystick in Pharo, if someone knows > about one, I'd like to integrate it to my code. https://github.com/Geal/Squeak-VM/tree/master/platforms/Mac%20OS/plugins/JoystickTabletPlugin Refers to a joystick plugin for squeak. I don't know if that is in the current distribution (it doesn't seem to be), so you might ask on the vm-dev list about it. I haven't looked at it, so it could be for a RS-232 based joystick instead of something more useful with a modern pc. Can't SDL2 be used with a joystick? Stephan |
Can't SDL2 be used with a joystick? It can be used. Although, joystick support was not very well integrated into OSWindow because joystick events are not being sent into a specific window. Now I am doing a cleanup on the joystick support, by sending the event to all the windows. I will publish an example soon. In SDL2 there are also two APIs for joysticks, the Joystick API and the GameController API (Joystick + layout mapping). I originally made the bindings only for the Joystick API. I just made the bindings for the GameController API, which is more useful, since you do not have to worry about different joystick layouts. There are also some events for detecting when a joystick is connected or disconnected from the machine which I am adding. 2016-04-09 20:18 GMT-03:00 Stephan Eggermont <[hidden email]>: On 09-04-16 15:24, Carolina Hernández wrote: |
this is cool
Stef Le 10/4/16 06:32, Ronie Salgado a
écrit :
|
In reply to this post by Stephan Eggermont-3
There is joystick support in 4.0, but not in Unix (plugin looks pretty empty). Smalltalk vm listBuiltinModules select: [ :each | each beginsWith: 'Joystick' ]. JoystickTabletPlugin VMMaker-oscog-nice13154.314 So, it is all in the InputEventSensor Check for senders of primReadJoystick: --> joystickXY:, joystickButtons: ... Phil On Sun, Apr 10, 2016 at 1:18 AM, Stephan Eggermont <[hidden email]> wrote: On 09-04-16 15:24, Carolina Hernández wrote: |
Ok, I made a cleanup on the OSWindow joystick support. I also added the OSWindowGenericRenderer interface which is implemented by a thin wrapper around the SDL2 renderer interface. I have tested this on Linux using a XBox 360 controller (using SDL2 GameController interface) and a PS2 controller via an USB adapter (using SDL2 Joystick interface). Later I will test it on Windows and Mac. ============================= Here is the demo: https://www.youtube.com/watch?v=lABfEmToHLQ&feature=youtu.be OSWindowJoystickExample new open. Xbox 360/mapped controls Left stick: move character X button: shoot Start: reset ============================= I also added a simple examples using the OSWindowGenericRenderer: OSWindowGenericRendererDrawingExample new open. ============================= I also modified the OSSDL2Driver >> #isSuitable method to not call the hasPlugin method. The plugin seems to be unnecessary according to several posts, and I am too lazy for fixing it. I guess that this should be eventually integrated into Pharo 5 after some reviewing. Before that, the latest version of OSWindow should be loaded manually. For that, the packages should be loaded in the following order: OSWindow-Core OSWindow-SDL2 OSWindow-SDL2-Examples SDL2Constants initialize. SDL_Event initialize 2016-04-10 3:15 GMT-03:00 [hidden email] <[hidden email]>:
|
Nice :-)
On 10.04.2016 12:05, Ronie Salgado
wrote:
|
In reply to this post by stepharo
+1
> On Apr 10, 2016, at 2:39 AM, stepharo <[hidden email]> wrote: > > this is cool > > Stef > > > Le 10/4/16 06:32, Ronie Salgado a écrit : >> Can't SDL2 be used with a joystick? >> >> It can be used. Although, joystick support was not very well integrated into OSWindow because joystick events are not being sent into a specific window. Now I am doing a cleanup on the joystick support, by sending the event to all the windows. I will publish an example soon. >> >> In SDL2 there are also two APIs for joysticks, the Joystick API and the GameController API (Joystick + layout mapping). I originally made the bindings only for the Joystick API. I just made the bindings for the GameController API, which is more useful, since you do not have to worry about different joystick layouts. There are also some events for detecting when a joystick is connected or disconnected from the machine which I am adding. >> >> >> >> 2016-04-09 20:18 GMT-03:00 Stephan Eggermont <[hidden email]>: >> On 09-04-16 15:24, Carolina Hernández wrote: >> I couldn't find any direct way to use a joystick in Pharo, if someone knows >> about one, I'd like to integrate it to my code. >> https://github.com/Geal/Squeak-VM/tree/master/platforms/Mac%20OS/plugins/JoystickTabletPlugin >> >> Refers to a joystick plugin for squeak. I don't know if that is in the current distribution >> (it doesn't seem to be), so you might ask on the vm-dev list about it. I haven't looked >> at it, so it could be for a RS-232 based joystick instead of something more useful with >> a modern pc. >> >> Can't SDL2 be used with a joystick? >> >> Stephan >> >> >> >> >> > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
In reply to this post by hernanmd
Hi Hernan,
Gazebo uses ROS somehow, so yes. Alexandre > On Apr 9, 2016, at 10:58 AM, Hernán Morales Durand <[hidden email]> wrote: > > Hi Carolina, > > Thank you for sharing. > Do you plan to support gazebo or tum_simulator in your API? > > Hernán > > http://gazebosim.org/ > http://wiki.ros.org/tum_simulator > > > 2016-04-09 10:24 GMT-03:00 Carolina Hernández <[hidden email]>: > Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at the University of Chile. > As part of my final degree project, I'm creating a communication API for controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early version. The code is hosted in Smalltalkhub: > http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo > > I also made a video of a test flight, where the AR.Drone is controlled using the API and keyboard: > https://www.youtube.com/watch?v=d8rERiBoD0o > > I couldn't find any direct way to use a joystick in Pharo, if someone knows about one, I'd like to integrate it to my code. > > Development and tests have been done in Pharo 4.0 and ubuntu 12.04 > Comments are welcome! > > Caro > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
In reply to this post by Carolina Hernández
This is really cool!
Ronie (from the DCC as well :-) has been working on a joystick support. Ronie will travel end of next week. So I suggest to talk to him very soon Alexandre > On Apr 9, 2016, at 10:24 AM, Carolina Hernández <[hidden email]> wrote: > > Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at the University of Chile. > As part of my final degree project, I'm creating a communication API for controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early version. The code is hosted in Smalltalkhub: > http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo > > I also made a video of a test flight, where the AR.Drone is controlled using the API and keyboard: > https://www.youtube.com/watch?v=d8rERiBoD0o > > I couldn't find any direct way to use a joystick in Pharo, if someone knows about one, I'd like to integrate it to my code. > > Development and tests have been done in Pharo 4.0 and ubuntu 12.04 > Comments are welcome! > > Caro -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
In reply to this post by abergel
I implement part of the gazebo/player API long time ago:
https://github.com/SergeStinckwich/PlayerST On Sun, Apr 10, 2016 at 5:15 PM, Alexandre Bergel <[hidden email]> wrote: > Hi Hernan, > > Gazebo uses ROS somehow, so yes. > > Alexandre > > >> On Apr 9, 2016, at 10:58 AM, Hernán Morales Durand <[hidden email]> wrote: >> >> Hi Carolina, >> >> Thank you for sharing. >> Do you plan to support gazebo or tum_simulator in your API? >> >> Hernán >> >> http://gazebosim.org/ >> http://wiki.ros.org/tum_simulator >> >> >> 2016-04-09 10:24 GMT-03:00 Carolina Hernández <[hidden email]>: >> Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at the University of Chile. >> As part of my final degree project, I'm creating a communication API for controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early version. The code is hosted in Smalltalkhub: >> http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo >> >> I also made a video of a test flight, where the AR.Drone is controlled using the API and keyboard: >> https://www.youtube.com/watch?v=d8rERiBoD0o >> >> I couldn't find any direct way to use a joystick in Pharo, if someone knows about one, I'd like to integrate it to my code. >> >> Development and tests have been done in Pharo 4.0 and ubuntu 12.04 >> Comments are welcome! >> >> Caro >> > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > -- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/ |
In reply to this post by Ronie Salgado
On 10 April 2016 at 06:32, Ronie Salgado <[hidden email]> wrote: In SDL2 there are also two APIs for joysticks, the Joystick API and the GameController API Is this the same as Apple's GameController.framework? I happen to have a SteelSeries Stratus XL gamepad that works with it, if we need tests or demos… |
Administrator
|
In reply to this post by stepharo
+1!
Cheers,
Sean |
In reply to this post by hernanmd
Hi Hernán, not for now, since my main goal is to make possible to program behaviors for the drone using the language LRP (Live Robot Programming). However, since I am using a spiral development method, I may consider it in a further stage. Thanks for the suggestion! Caro About LRP: 2016-04-09 10:58 GMT-03:00 Hernán Morales Durand <[hidden email]>:
|
Free forum by Nabble | Edit this page |