New project: AR.Drone communication API in Pharo
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
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
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 <carola.hp@gmail.com>:
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
Hi Hernan, Gazebo uses ROS somehow, so yes. Alexandre
On Apr 9, 2016, at 10:58 AM, Hernán Morales Durand <hernan.morales@gmail.com> 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 <carola.hp@gmail.com>: 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
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 <alexandre.bergel@me.com> wrote:
Hi Hernan,
Gazebo uses ROS somehow, so yes.
Alexandre
On Apr 9, 2016, at 10:58 AM, Hernán Morales Durand <hernan.morales@gmail.com> 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 <carola.hp@gmail.com>: 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/
Hi Alex, I read your comment after I posted a response. I don't have so much experience to ROS, and none to PhaROS. But, are you saying that using Gazebo with the API would be somehow straight forward? 2016-04-10 12:15 GMT-03:00 Alexandre Bergel <alexandre.bergel@me.com>:
Hi Hernan,
Gazebo uses ROS somehow, so yes.
Alexandre
On Apr 9, 2016, at 10:58 AM, Hernán Morales Durand < hernan.morales@gmail.com> 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 <carola.hp@gmail.com>: 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Gazebo/PlayerStage define a common API to control robots. This API is also implement in the Gazebo simulation engine. Please have a look to my PlayerST code. Sent from my iPhone
On 12 avr. 2016, at 06:04, Carolina Hernández <carola.hp@gmail.com> wrote:
Hi Alex, I read your comment after I posted a response. I don't have so much experience to ROS, and none to PhaROS. But, are you saying that using Gazebo with the API would be somehow straight forward?
2016-04-10 12:15 GMT-03:00 Alexandre Bergel <alexandre.bergel@me.com>:
Hi Hernan,
Gazebo uses ROS somehow, so yes.
Alexandre
On Apr 9, 2016, at 10:58 AM, Hernán Morales Durand <hernan.morales@gmail.com> 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 <carola.hp@gmail.com>: 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
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: http://pleiad.dcc.uchile.cl/papers/2014/fabryAl-iberamia14.pdf 2016-04-09 10:58 GMT-03:00 Hernán Morales Durand <hernan.morales@gmail.com>:
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 <carola.hp@gmail.com>:
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
Thanks for the reply Carolina, Alex and Serge. Cheers, Hernán 2016-04-12 0:27 GMT-03:00 Carolina Hernández <carola.hp@gmail.com>:
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: http://pleiad.dcc.uchile.cl/papers/2014/fabryAl-iberamia14.pdf
2016-04-09 10:58 GMT-03:00 Hernán Morales Durand <hernan.morales@gmail.com
:
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 <carola.hp@gmail.com>:
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
Hola Hernan, Carolina is doing cool work, which is why I pushed her to make this announcement and video :-) I first want to get LRP working with the drone (more on LRP also on http://pleiad.cl/LRP <http://pleiad.cl/LRP> ). The philosophy of LRP is to do as much as possible on real hardware for a fast development cycle, so simulation of the drone is a very low priority right now. Carolina told me there are more features inside the drone, for augmented reality stuff if I remember correctly. So we will first investigate that to see if we can get more features inside LRP, because that sounds really cool.
On Apr 12, 2016, at 00:27, Carolina Hernández <carola.hp@gmail.com> wrote:
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: http://pleiad.dcc.uchile.cl/papers/2014/fabryAl-iberamia14.pdf <http://pleiad.dcc.uchile.cl/papers/2014/fabryAl-iberamia14.pdf>
2016-04-09 10:58 GMT-03:00 Hernán Morales Durand <hernan.morales@gmail.com <mailto:hernan.morales@gmail.com>>: Hi Carolina,
Thank you for sharing. Do you plan to support gazebo or tum_simulator in your API?
Hernán
http://gazebosim.org/ <http://gazebosim.org/> http://wiki.ros.org/tum_simulator <http://wiki.ros.org/tum_simulator>
2016-04-09 10:24 GMT-03:00 Carolina Hernández <carola.hp@gmail.com <mailto:carola.hp@gmail.com>>: 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/#!/~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 <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
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Beautiful work! Doru
On Apr 9, 2016, at 6:24 AM, Carolina Hernández <carola.hp@gmail.com> 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."
On Sat, Apr 9, 2016 at 9:24 PM, Carolina Hernández <carola.hp@gmail.com> 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
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 <carola.hp@gmail.com> 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
Hi Krish Thanks for all your comments. About the #initialize method, I think you are right, and some code refactoring would solve it. Also, about the #takeOff method, maybe the comments are not so explicative, but it just sends the take off command until the drone is actually flying. In practice, it sends it twice and then stops. The logic for the land command is very similar. They are designed that way to ensure the drone will take off or land after only one call of the corresponding method. Thanks for your advice on avoiding Float and Integer overrides, it would be cleaner to include the methods in the ARDrone package. Cheers Caro 2016-04-09 13:56 GMT-03:00 S Krish <krishnamachari.sudhakar@gmail.com>:
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 <carola.hp@gmail.com> 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
On Apr 12, 2016, at 00:52, Carolina Hernández <carola.hp@gmail.com> wrote:
Hi Krish Thanks for all your comments.
I agree with Krish that the code is well done, plus the documentation is very complete, I like that a lot!
About the #initialize method, I think you are right, and some code refactoring would solve it.
Yes, I would move both block definitions to their separate methods, that should make the code more readable.
Also, about the #takeOff method, maybe the comments are not so explicative, but it just sends the take off command until the drone is actually flying. In practice, it sends it twice and then stops. The logic for the land command is very similar. They are designed that way to ensure the drone will take off or land after only one call of the corresponding method.
For me at least the comment in takeOff is clear.
Thanks for your advice on avoiding Float and Integer overrides, it would be cleaner to include the methods in the ARDrone package.
Indeed, I think it would be better to have these on ARDCommandManager, as it is the only place they are used and furthermore donât rely on private state of Float or Integer. ---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
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
Hi Stef, All communications with the AR.Drone are done via exchage of UDP and TCP packages between the drone's firmware and the client. Packages are sent by a Wifi network, which is managed by the drone's firmware. In addition to this, the firmware automates the flight manouvers (take off, roll, pitch, hover etc.), sends a navigation data stream, and a video stream. The client can control the drone's movement and configuration by sending 'AT commands', whose structure is specified in the AR.Drone developer guide. I'm now sure if I answered your question. If I didn't please let me know. Thanks for your interest AR.Drone developer guide: https://abstract.cs.washington.edu/~shwetak/classes/ee472/notes/ARDrone_SDK_... 2016-04-09 15:12 GMT-03:00 stepharo <stepharo@free.fr>:
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
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/Joy...
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 <stephan@stack.nl>:
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/Joy...
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
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 <stephan@stack.nl <mailto:stephan@stack.nl>>:
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/Joy...
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
+1
On Apr 10, 2016, at 2:39 AM, stepharo <stepharo@free.fr> 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 <stephan@stack.nl>: 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/Joy...
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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
stepharo wrote
this is cool
+1! ----- Cheers, Sean -- View this message in context: http://forum.world.st/New-project-AR-Drone-communication-API-in-Pharo-tp4889... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 10 April 2016 at 06:32, Ronie Salgado <roniesalg@gmail.com> 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â¦
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 <stephan@stack.nl> wrote:
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/Joy...
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
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 After that, the following doIt is required in a playground to start receiving events: SDL2Constants initialize. SDL_Event initialize Best regards, Ronie 2016-04-10 3:15 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
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 <stephan@stack.nl> wrote:
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/Joy...
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
Nice :-) On 10.04.2016 12:05, Ronie Salgado 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
After that, the following doIt is required in a playground to start receiving events:
SDL2Constants initialize. SDL_Event initialize
Best regards, Ronie
2016-04-10 3:15 GMT-03:00 phil@highoctane.be <mailto:phil@highoctane.be> <phil@highoctane.be <mailto:phil@highoctane.be>>:
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 <stephan@stack.nl <mailto:stephan@stack.nl>> wrote:
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/Joy...
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
Hi Ronnie, that's is really nice! I'm talking to you in private 2016-04-10 7:05 GMT-03:00 Ronie Salgado <roniesalg@gmail.com>:
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
After that, the following doIt is required in a playground to start receiving events:
SDL2Constants initialize. SDL_Event initialize
Best regards, Ronie
2016-04-10 3:15 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
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 <stephan@stack.nl> wrote:
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/Joy...
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
I forgot to ask, will this work with a PS2 joystick? We have one available in the robotics lab that we can use for that.
On Apr 12, 2016, at 02:41, Carolina Hernández <carola.hp@gmail.com> wrote:
Hi Ronnie, that's is really nice!
I'm talking to you in private
2016-04-10 7:05 GMT-03:00 Ronie Salgado <roniesalg@gmail.com <mailto:roniesalg@gmail.com>>: 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 <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
After that, the following doIt is required in a playground to start receiving events:
SDL2Constants initialize. SDL_Event initialize
Best regards, Ronie
2016-04-10 3:15 GMT-03:00 phil@highoctane.be <mailto:phil@highoctane.be> <phil@highoctane.be <mailto:phil@highoctane.be>>: 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 <stephan@stack.nl <mailto:stephan@stack.nl>> wrote: 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/Joy... <https://github.com/Geal/Squeak-VM/tree/master/platforms/Mac%20OS/plugins/Joy...>
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
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Ronie There is no configurationOfOSWindow? Because loading package one by one does not work and we have the solution. A configuration. Then if you do not do it. Who will do it? Me without knowing what you did? If you want that people review the code then it should be easy for them to review it. Can you enter a bug entry? Stef Le 10/4/16 12:05, Ronie Salgado a écrit :
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
After that, the following doIt is required in a playground to start receiving events:
SDL2Constants initialize. SDL_Event initialize
Best regards, Ronie
2016-04-10 3:15 GMT-03:00 phil@highoctane.be <mailto:phil@highoctane.be> <phil@highoctane.be <mailto:phil@highoctane.be>>:
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 <stephan@stack.nl <mailto:stephan@stack.nl>> wrote:
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/Joy...
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
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 <carola.hp@gmail.com> 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I did! Thanks a lot 2016-04-10 12:16 GMT-03:00 Alexandre Bergel <alexandre.bergel@me.com>:
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 <carola.hp@gmail.com> 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (16)
-
Alexandre Bergel -
Ben Coman -
Carolina Hernández -
Damien Pollet -
Hernán Morales Durand -
Johan Fabry -
phil@highoctane.be -
Ronie Salgado -
S Krish -
Sean P. DeNigris -
Serge Stinckwich -
serge.stinckwich@gmail.com -
Stephan Eggermont -
stepharo -
Tudor Girba -
Volkert