0
$\begingroup$

Rosanswers logo

I can't get the p2os to function with teleop. I have the p2os board running. When I launch the p2os teleop, it works, but doesn't move (I am aware you have to hold down a button and tried all of them).

thanks in advance,

-Hunter A.


On the pioneer:

allenh1@hmt-lisa:~$ rosrun p2os_driver p2os 
[ INFO] [1339516647.279359983]: using serial port: [/dev/ttyUSB0]
[ INFO] [1339516647.346416374]: P2OS connection opening serial port /dev/ttyUSB0...
[ INFO] [1339516647.766984936]: SYNC0
[ INFO] [1339516647.970936556]: turning off NONBLOCK mode...
[ INFO] [1339516648.174984688]: SYNC1
[ INFO] [1339516648.583028887]: SYNC2
[ INFO] [1339516649.195027317]: Done.
   Connected to Julie_2, a Pioneer P3DX
[ INFO] [1339516651.631304804]: resetting raw positions

The p2os successfully initializes. Now the joystick driver:

allenh1@hmt-lisa:/opt/ros/diamondback/stacks/p2os/p2os_launch$ roslaunch teleop_joy.launch 
... logging to /home/allenh1/.ros/log/6ff3ea14-b4a6-11e1-ad58-0025648c1ab0/roslaunch-hmt-lisa-1125.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://129.59.89.250:54917/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /deadman_button
 * /rosversion
 * /axis_vw
 * /run_button
 * /axis_vy
 * /axis_vx

NODES
  /
    p2os_teleop (p2os_teleop/p2os_teleop)
    pioneer_joy_controller (joy/joy_node)

ROS_MASTER_URI=http://129.59.89.109:11311

core service [/rosout] found
process[p2os_teleop-1]: started with pid [1134]
process[pioneer_joy_controller-2]: started with pid [1135]
[pioneer_joy_controller-2] process has finished cleanly.
log file: /home/allenh1/.ros/log/6ff3ea14-b4a6-11e1-ad58-0025648c1ab0/pioneer_joy_controller-2*.log
^C[p2os_teleop-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

The joystick node is up. On the host computer, I did a topic list:

allenh1@muri-pc7:~$ rostopic list
/aio
/base_controller/command
/battery_state
/cmd_motor_state
/cmd_vel
/diagnostics
/dio
/gripper_control
/gripper_state
/joy
/motor_state
/pose
/ptz_control
/ptz_state
/rosout
/rosout_agg
/sonar
/tf

Echoing the joystick node, the following error is presented:

allenh1@muri-pc7:~$ rostopic echo joy
ERROR: Cannot load message class for [joy/Joy]. Are your messages built?

Originally posted by allenh1 on ROS Answers with karma: 3055 on 2012-06-12

Post score: 0


Original comments

Comment by karthik on 2012-06-12:
Could you please specify the commands you used and be specific on whether you use joystick or keyboard?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Hi, This is a general problem people face when they directly use the joystick drivers. I would suggest you to find out how the mapping of the joystick buttons done to give the cmd_vel commands. So test the joystick functions against the cmd_vel outputs using.

rostopic echo /joy

and

rostopic echo /cmd_vel

Please check the teleop_joy launch file as well for the same. This tutorial might be of some help to you to understand about the remapping of the buttons according to the joystick you are using. teleop using the keyboard works straight forward but its better to use joystick for the easy usage.


Originally posted by karthik with karma: 2831 on 2012-06-12

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

The motor must be enabled with the p2os_dashboard.


Originally posted by allenh1 with karma: 3055 on 2012-06-12

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.