Control your Parrot Jumping Sumo drone using JavaScript!
This module allows you to control and receive video data from the Parrot Jumping Sumo WiFi controlled drone.
The implementation is heavily based on the node-bebop from @hybridgroup. The Bebop and Jumping Sumo share the same underlying connection and management protocol with the following differences:
- Jumping Sumo transmits MJPEG video instead of H.264 (no iframes to worry about)
- The commands to drive the Jumping Sumo are completely different from those to fly the Bebop
- The events from the Jumping Sumo are (mostly) different from those from the Bebop
To get started, install the npm module:
$ npm install git+https://github.com/alronz/node-sumo
This simple example postures the drone and moves it forwards for 1 second:
var sumo = require('node-sumo');
var drone = sumo.createClient();
drone.connect(function() {
drone.postureJumper();
drone.forward(50);
setTimeout(function() {
drone.stop();
}, 1000);
});
Returns a new Sumo
Returns a stream of MJPEG frames through the data
event.
Connects to the drone and executes the callback when the drone is ready to drive. Also fires the ready
event when teh drone is ready.
Move the drone forward at the specified speed (between 0 and 100).
Move the drone backward at the specified speed (between 0 and 100).
Turn the drone right at the specified speed (between 0 and 100).
Turn the drone right at the specified speed (between 0 and 100).
Tell the drone to stop moving.
Perform a long jump. The drone needs to be in the jumper or kicker posture to use this API.
When in kicker posture the first call will retract the drone's jump mechanism and the second will release it. You need to wait for the drone's jump mechanism to be fully retracted before releasing it. You can move the drone after the jump mechanism has been pulled in (for example, reversing up to a wall or object to kick) and before you release it.
Perform a high jump. The drone needs to be in the jumper posture to use this API.
Stop the pre-programmed animation.
Perform a spin.
Tap the drone's jump mechanism.
Shake the drone from side-to-side.
Perform the metronome animation.
Perform the ondulation animation.
Spin and then jump the drone.
Spin and then change posture.
Make the drone drive in a spiral.
Make the drone drive in a slalom pattern.
Move the drone into the standing (on head) posture.
Move the drone into the jumper posture. The drone's jump mechanism is used to propel the drone into the air.
Move the drone into the kicker posture. The drone's jump mechanism is used to kick objects behind the drone.
Take picture and store it internally
Emits the MJPEG video stream.
Emitted when the application has connected to the drone and it is ready for commands.
Emits the battery level percentage.
Emitted when the drone changes to the standing posture. The event may be emitted slightly before the movement is complete so you may want to wait a short time before sending the drone futher commands.
Emitted when the drone changes to the jumper posture. The event may be emitted slightly before the movement is complete so you may want to wait a short time before sending the drone futher commands.
Emitted when the drone changes to the kicker posture. The event may be emitted slightly before the movement is complete so you may want to wait a short time before sending the drone futher commands.
Emitted when the drone is stuck.
Emitted when the drone is in an unknown position.
Emitted when the battery is at a critically low level.
Emitted when the battery is at a low level.
Emitted when the load state of the jump mechanism is unknown.
Emitted when the jump mechanism is unloaded (for example, after a jump or kick). The event may be emitted slightly before the movement is complete so you may want to wait a short time before sending the drone futher commands.
Emitted when the jump mechanism is retracted (for example, after a long jump while in the kicker posture). The event may be emitted slightly before the movement is complete so you may want to wait a short time before sending the drone futher commands.
Emitted when the jump mechanism is busy (for example, if you tell the drone to jump while a jump is already in progress).
Emitted when the jump mechanism is unloaded and the drone cannot perform the jump requested because the battery is low.
Emitted when the jump mechanism is unloaded and the drone cannot perform the jump requested because the battery is low.
Emitted when the jump motor is OK (it may have previously been blocked or overheated).
Emitted when the jump motor is blocked.
Emitted when the jump motor has overheated.
Emits single MJPEG video frame
Emitted when a photo is taken and stored internally (response to takePicture(opts))
0.0.1 Initial release
Copyright (c) 2015 Acision. Licensed under the MIT license.