Public Member Functions | Private Member Functions | Private Attributes
org.ros.android.view.DistanceView Class Reference
Inheritance diagram for org.ros.android.view.DistanceView:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void currentSpeed (double speed)
 DistanceView (Context context)
 DistanceView (Context context, AttributeSet attrs)
GraphName getDefaultNodeName ()
void lockZoom ()
void onError (Node node, Throwable throwable)
void onNewMessage (final LaserScan message)
void onShutdown (Node node)
void onShutdownComplete (Node node)
void onStart (ConnectedNode connectedNode)
boolean onTouch (View v, MotionEvent event)
void setTopicName (String topicName)
void setZoomMode (ZoomMode mode)
void unlockZoom ()

Private Member Functions

double calculateDistance (float x1, float y1, float x2, float y2)

Private Attributes

double contactDistance
DistanceRenderer distanceRenderer
String laserTopic
double normalizedZoomValue

Detailed Description

An OpenGL view that displayed data from a laser scanner (or similar sensors like a kinect). This view can zoom in/out based in one of three modes. The user can change the zoom level through a pinch/reverse-pinch, the zoom level can auto adjust based on the speed of the robot, and the zoom level can also auto adjust based on the distance to the closest object around the robot.

Author:
munjaldesai@google.com (Munjal Desai)

Definition at line 46 of file DistanceView.java.


Constructor & Destructor Documentation

org.ros.android.view.DistanceView.DistanceView ( Context  context) [inline]

Initialize the rendering surface.

Parameters:
context

Definition at line 74 of file DistanceView.java.

org.ros.android.view.DistanceView.DistanceView ( Context  context,
AttributeSet  attrs 
) [inline]

Definition at line 78 of file DistanceView.java.


Member Function Documentation

double org.ros.android.view.DistanceView.calculateDistance ( float  x1,
float  y1,
float  x2,
float  y2 
) [inline, private]

Definition at line 240 of file DistanceView.java.

void org.ros.android.view.DistanceView.currentSpeed ( double  speed) [inline]

Updates the current speed in distanceRenderer which then can adjust the zoom level in velocity mode.

Parameters:
speedThe linear velocity of the robot.

Definition at line 198 of file DistanceView.java.

Implements org::ros::node::NodeMain.

Definition at line 101 of file DistanceView.java.

Prevents changes to the zoom level.

Definition at line 180 of file DistanceView.java.

void org.ros.android.view.DistanceView.onError ( Node  node,
Throwable  throwable 
) [inline]

Implements org::ros::node::NodeListener.

Definition at line 142 of file DistanceView.java.

void org.ros.android.view.DistanceView.onNewMessage ( final LaserScan  message) [inline]

Definition at line 146 of file DistanceView.java.

Implements org::ros::node::NodeListener.

Definition at line 132 of file DistanceView.java.

Implements org::ros::node::NodeListener.

Definition at line 136 of file DistanceView.java.

void org.ros.android.view.DistanceView.onStart ( ConnectedNode  connectedNode) [inline]

Implements org::ros::node::NodeListener.

Definition at line 106 of file DistanceView.java.

boolean org.ros.android.view.DistanceView.onTouch ( View  v,
MotionEvent  event 
) [inline]

Definition at line 203 of file DistanceView.java.

void org.ros.android.view.DistanceView.setTopicName ( String  topicName) [inline]

Sets the topic that the distance view node should subscribe to.

Parameters:
topicNameName of the ROS topic.

Definition at line 96 of file DistanceView.java.

Sets the zoom mode to one of the modes in ZoomMode.

Parameters:
modeThe zoom mode that must be set.

Definition at line 173 of file DistanceView.java.

Unlocks the zoom allowing it to be changed.

Definition at line 187 of file DistanceView.java.


Member Data Documentation

Distance between 2 contacts on the view (in pixels). Used while zooming in/out.

Definition at line 57 of file DistanceView.java.

An instance of DistanceRenderer that implements GLSurfaceView.Renderer and is used to render the distance view.

Definition at line 67 of file DistanceView.java.

Topic for the distance scans that this view subscribes to.

Definition at line 52 of file DistanceView.java.

Zoom value between 1 and 0. 1 represents maximum zoom in and 0 maximum zoom out.

Definition at line 62 of file DistanceView.java.


The documentation for this class was generated from the following file:


android_core
Author(s): Damon Kohler
autogenerated on Thu Aug 27 2015 12:11:33