org.ros.android.view
Class VirtualJoystickView
java.lang.Object
RelativeLayout
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.
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 |
VirtualJoystickView
public VirtualJoystickView(Context context)
VirtualJoystickView
public VirtualJoystickView(Context context,
AttributeSet attrs)
VirtualJoystickView
public VirtualJoystickView(Context context,
AttributeSet attrs,
int defStyle)
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