teleop_twist_iphone
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:a ROS node that allows you to control your robot from your iPhone browser
This ROS node allows you to teleoperate your robot from your iPhone/iPod/iPad.

The robot node must understand Twist messages. X is forward. Rotations are done
about the Z axis.

The iPhone/iPod/iPad/other must support WebSockets and touch events. I've only
tested this with my iPod.

The computer running the node must have Tornado installed. The version in
Ubuntu's repository is too old.

The maximum speed is adjustable by setting the ~maximum_linear_speed and
~maximum_angular_speed parameters. These default to 0.5 and 0.5.

Setting ~rate will cause the last motion command to be republished rate times
per second. Some robot drivers stop the robot if there aren't any more movement
commands.

WARNING:
I should probably warn you now that during the use of this node, you may:
 * Bump the edge of the screen, causing the robot to rapidly accelerate,
   throwing lose equipment off, and crashing into something.
 * Lose your network connection is such a way that the server does not notice
   until the connection times out, causing the robot to continue driving like
   as it has been until it crashes into something. This could be fixed by
   stopping the robot if no updates are received in a certain time period, and
   having the client send periodic messages to keep the connection alive.
This code may cause physical damage to you, your robot, your environment, etc.
USE AT YOUR OWN RISK.

Instructions:
 * Run the node.

 * Connect to http://:3000/ from Safari on your iPhone. You should see a
   white screen with a crosshair in the middle. Red indicates means that you are
   not connected to the node.

 * Carefully drag your finger around the screen. The middle of the screen is
   (0, 0). Dragging up will cause the robot to drive forward. Down is reverse.
   Left and right cause the robot to turn. Dragging away from the center
   increases the speed. Removing your finger from the screen will cause the
   robot to stop.

Ideas:
 * Can the robot stream video to be displayed behind the crosshair?

 * Should this be separated into one node that publishes touch points(maybe even
   multitouch?) and accelerometer and gyroscope and compas and location data,
   and another node that translates it into Twist messages? All that data is
   available to Javascript applications since iOS 4.2. Doing so could turn your
   iPhone into a capable sensor without jailbreaking.

   My iPod only has an accelerometer and a very uncertain location guess by
   nearby wireless networks. My robot has two accelerometers already, so there
   isn't much of a point in adding this functionality at the moment. Maybe if I
   get some free time I'll borrow an iPhone 3GS and publish the sensors.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。