org.ros.android.view
Class VirtualJoystickView

java.lang.Object
  extended by RelativeLayout
      extended by org.ros.android.view.VirtualJoystickView
All Implemented Interfaces:
org.ros.message.MessageListener<nav_msgs.Odometry>, org.ros.node.NodeListener, org.ros.node.NodeMain

public class VirtualJoystickView
extends RelativeLayout
implements org.ros.message.MessageListener<nav_msgs.Odometry>, org.ros.node.NodeMain

VirtualJoystickView creates a virtual joystick view that publishes velocity as (geometry_msgs.Twist) messages. The current version contains the following features: snap to axes, turn in place, and resume previous velocity.


Constructor Summary
VirtualJoystickView(Context context)
           
VirtualJoystickView(Context context, AttributeSet attrs)
           
VirtualJoystickView(Context context, AttributeSet attrs, int defStyle)
           
 
Method Summary
 void DisableSnapping()
          Allows the user the option to turn off the auto-snap feature.
 void EnableSnapping()
          Allows the user the option to turn on the auto-snap feature.
 org.ros.namespace.GraphName getDefaultNodeName()
           
 void onAnimationEnd(Animation animation)
           
 void onAnimationRepeat(Animation animation)
           
 void onAnimationStart(Animation animation)
           
 void onError(org.ros.node.Node node, java.lang.Throwable throwable)
           
protected  void onLayout(boolean changed, int l, int t, int r, int b)
          Initialize the fields with values that can only be determined once the layout for the views has been determined.
 void onNewMessage(nav_msgs.Odometry message)
           
 void onShutdown(org.ros.node.Node node)
           
 void onShutdownComplete(org.ros.node.Node node)
           
 void onStart(org.ros.node.ConnectedNode connectedNode)
           
 boolean onTouchEvent(MotionEvent event)
           
 void setHolonomic(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ros.message.MessageListener
onNewMessage
 

Constructor Detail

VirtualJoystickView

public VirtualJoystickView(Context context)

VirtualJoystickView

public VirtualJoystickView(Context context,
                           AttributeSet attrs)

VirtualJoystickView

public VirtualJoystickView(Context context,
                           AttributeSet attrs,
                           int defStyle)
Method Detail

setHolonomic

public void setHolonomic(boolean enabled)
Parameters:
enabled - true if this joystick should publish linear velocities along the Y axis instead of angular velocities along the Z axis, false otherwise

onAnimationEnd

public void onAnimationEnd(Animation animation)

onAnimationRepeat

public void onAnimationRepeat(Animation animation)

onAnimationStart

public void onAnimationStart(Animation animation)

onNewMessage

public void onNewMessage(nav_msgs.Odometry message)

onTouchEvent

public boolean onTouchEvent(MotionEvent event)

EnableSnapping

public void EnableSnapping()
Allows the user the option to turn on the auto-snap feature.


DisableSnapping

public void DisableSnapping()
Allows the user the option to turn off the auto-snap feature.


onLayout

protected void onLayout(boolean changed,
                        int l,
                        int t,
                        int r,
                        int b)
Initialize the fields with values that can only be determined once the layout for the views has been determined.


getDefaultNodeName

public org.ros.namespace.GraphName getDefaultNodeName()
Specified by:
getDefaultNodeName in interface org.ros.node.NodeMain

onStart

public void onStart(org.ros.node.ConnectedNode connectedNode)
Specified by:
onStart in interface org.ros.node.NodeListener

onShutdown

public void onShutdown(org.ros.node.Node node)
Specified by:
onShutdown in interface org.ros.node.NodeListener

onShutdownComplete

public void onShutdownComplete(org.ros.node.Node node)
Specified by:
onShutdownComplete in interface org.ros.node.NodeListener

onError

public void onError(org.ros.node.Node node,
                    java.lang.Throwable throwable)
Specified by:
onError in interface org.ros.node.NodeListener