|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object GLSurfaceView org.ros.android.view.DistanceView
public class DistanceView
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.
Constructor Summary | |
---|---|
DistanceView(Context context)
Initialize the rendering surface. |
|
DistanceView(Context context,
AttributeSet attrs)
|
Method Summary | |
---|---|
void |
currentSpeed(double speed)
Updates the current speed in distanceRenderer which then can
adjust the zoom level in velocity mode. |
org.ros.namespace.GraphName |
getDefaultNodeName()
|
void |
lockZoom()
Prevents changes to the zoom level. |
void |
onError(org.ros.node.Node node,
java.lang.Throwable throwable)
|
void |
onNewMessage(sensor_msgs.LaserScan message)
|
void |
onShutdown(org.ros.node.Node node)
|
void |
onShutdownComplete(org.ros.node.Node node)
|
void |
onStart(org.ros.node.ConnectedNode connectedNode)
|
boolean |
onTouch(View v,
MotionEvent event)
|
void |
setTopicName(java.lang.String topicName)
Sets the topic that the distance view node should subscribe to. |
void |
setZoomMode(ZoomMode mode)
Sets the zoom mode to one of the modes in ZoomMode . |
void |
unlockZoom()
Unlocks the zoom allowing it to be changed. |
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 |
---|
public DistanceView(Context context)
context
- public DistanceView(Context context, AttributeSet attrs)
Method Detail |
---|
public void setTopicName(java.lang.String topicName)
topicName
- Name of the ROS topic.public org.ros.namespace.GraphName getDefaultNodeName()
getDefaultNodeName
in interface org.ros.node.NodeMain
public void onStart(org.ros.node.ConnectedNode connectedNode)
onStart
in interface org.ros.node.NodeListener
public void onShutdown(org.ros.node.Node node)
onShutdown
in interface org.ros.node.NodeListener
public void onShutdownComplete(org.ros.node.Node node)
onShutdownComplete
in interface org.ros.node.NodeListener
public void onError(org.ros.node.Node node, java.lang.Throwable throwable)
onError
in interface org.ros.node.NodeListener
public void onNewMessage(sensor_msgs.LaserScan message)
public void setZoomMode(ZoomMode mode)
ZoomMode
.
mode
- The zoom mode that must be set.public void lockZoom()
public void unlockZoom()
public void currentSpeed(double speed)
distanceRenderer
which then can
adjust the zoom level in velocity mode.
speed
- The linear velocity of the robot.public boolean onTouch(View v, MotionEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |