Will's Teleop Notes
Set up your shell variables. Lines beginning with 'D:' are commands for the desktop, lines beginning with 'R:' are commands for the robot.
- D:
roscore - check ROS_MASTER_URI on the robot
- D:
rxgraph(note: only updates when you mouse over something on the graph) - D:
rosrun p2os_dashboard p2os_dashboard - R:
rosrun p2os_driver p2os - note battery level indicator.
- note gear is red - robot will not run (this is a good thing)
- D:
rosrun joy joy_node - D:
rostopic echo /joy - Play with joystick.
Note which button is which and which axis is which.
rosparam set /run_button 0rosparam set /deadman_button 0rosparam set /axis_vx 1rosparam set /axis_vw 0rosparam set /axis_vy 3rosparam set /max_vw_run 3
The following commands are options:
rosparam set /max_vx_run 1rosparam set /max_vx 0.8rosparam set /max_vw 2
Now start the translator from joystick to robot velocity commands:
rosrun p2os_teleop p2os_teleoprostopic echo /cmd_vel
At this stage we're going to start actually moving the robot. It is important that you don't drag anything behind the robot. Disconnect all cables.
- Now unplug the robot
- note the battery level drops in the p2os dashboard - batteries are old.
click on gear an enable the robot.
Now you should be able to drive the robot with the joystick
Now we'll look into those motion commands:
- Kill teleop
rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.3, 0.0, 0.0]' '[0.0, 0.0, 0.5]'
Now we'll turn the robot back off:
- click on the gear to disable the robot
- reconnect the power to the robot
Thanks to the ROS wiki p2os docs.