[Documentation] [TitleIndex] [WordIndex

API review

Proposer: Melonee Wise

Present at review:

Overview

As part of electric, I am adding the capability to set the leds and rumble level of the ps3 controller. For this I am proposing two new msgs for setting the rumble and led. I have implemented the proposed changes in trunk for people to try out.

Follow the these tutorials to pair the ps3joy stick and run the driver: http://wiki/ps3joy/Tutorials/PairingJoystickAndBluetoothDongle

Then you can set the leds by calling:

rostopic pub /ps3joy/set_led ps3joy/SetLED 1 0 0 1

or set the rumble by calling:

rostopic pub /ps3joy/set_led ps3joy/SetRumble 255 0 

Proposed Messages

Possible Generalized Messages

Another Possibility

Example uses

These examples take advantage of the fact that the boolean "loop" defaults to false.

To turn on LED 1

To do a repeating on-off rumble sequence with 70% duty cycle

To rumble for 1 second and stop

To turn LEDs 1,2,3,4 to off,on,on,off respectively

Another Possibility Refined

Example uses

To turn on LED 0

To do a repeating on-off rumble sequence with 70% duty cycle

To rumble for 1 second and stop

To turn LEDs 1,2,3,4 to off,on,on,off respectively

Question / concerns / comments

Enter your thoughts on the API and any questions / concerns you have here. Please sign your name. Anything you want to address in the API review should be marked down here before the start of the meeting.

(Melonee) - ping Any feedback on dave's message suggestion?

Rationale for 'Another Possibility Refined'

The main purpose for these compound messages is to ease the work done within a publisher by allowing the publisher to ignore timing and needed loops. However, I think that these messages strongly need a support node, let's called it feedback_tools, that will take in FeedbackSequenceArray, FeedbackArray, and FeedbackSequence and output only Feedback. Lots of complicated timing in parallel will make driver development difficult and driver developers will write redundant code.

The only thing I'm willing to ask of a driver is that it accept the Feedback message and have timing to turn off the value at an approximate time. Ex: If the joystick runs at a certain rate, then I'm fine with it turning off an led at its convenience in its normal loop instead of spawning timers or threads.

If the hardware supports it, then a driver can choose to accept other messages as applicable. For instance, if there is a command to blink or rumble with certain periods/duty cycles, then the driver could choose to accept FeedbackSequence. Or if the command mandates that all LED information is sent at once, the driver can choose to accept FeedbackArray. These messages should be optional to support less work in developing simple, initial drivers.

Also the current message doesn't allow for using the built in driver functionality because it will be almost impossible to convert the second timing to the ps3joy duty cycle input

Meeting agenda

To be filled out by proposer based on comments gathered during API review period

Conclusion

Package status change mark change manifest)



2024-11-09 14:46