Ask Your Question
0

P2OS teleop

asked 2012-06-12 06:54:22 -0500

allenh1 gravatar image

updated 2012-06-12 07:49:34 -0500

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?
edit retag flag offensive close merge delete

Comments

Could you please specify the commands you used and be specific on whether you use joystick or keyboard?

karthik gravatar imagekarthik ( 2012-06-12 07:04:13 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
2

answered 2012-06-12 08:26:10 -0500

allenh1 gravatar image

The motor must be enabled with the p2os_dashboard.

edit flag offensive delete link more
2

answered 2012-06-12 07:26:53 -0500

karthik gravatar image

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.

edit flag offensive delete link more
0

answered 2012-07-31 06:13:09 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi Park, I get the same problem with you. When I run the program $ roslaunch p2os_launch teleop_joy.launch, it works, but the pioneer doesn't move.

Blockquote

... logging to /home/wkk/.ros/log/038d02ea-db28-11e1-bbbc-b8ac6f0e8639/roslaunch-wkk-desktop-7050.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://wkk-desktop:44108/

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://localhost:11311

core service [/rosout] found

process[p2os_teleop-1]: started with pid [7068]

process[pioneer_joy_controller-2]: started with pid [7070]

Blockquote

Just like the pre-answers, I did a topic list on the host computer:

Blockquote

wkk@wkk-desktop:~$ rostopic list

/aio

/battery_state

/cmd_motor_state

/cmd_vel

/diagnostics

/diagnostics_agg

/dio

/gripper_control

/gripper_state

/motor_state

/pose

/ptz_control

/ptz_state

/rosout

/rosout_agg

/sonar

/tf

Blockquote

The problem is the same with you when I test "rostopic echo /joy" and "rostopic echo /cmd_vel":

"rostopic echo /joy" works well...but pioneer doesn't work..and "rostopic echo /cmd_vel" are blank when I push the joystick buttons.

edit flag offensive delete link more
0

answered 2012-07-29 19:12:39 -0500

Park gravatar image

updated 2012-07-29 19:48:20 -0500

Could you solve this problem? I have the same problems with you. I have Pioneer 3-at without built in computer and notebook connected with pioneer using serial to usb cable.

I run the program (roscore, run p2os_dashboard, run p2os_drive, roslaunch telop_joy) and then enable the motor on the dashboard. rostopic lists are the same as you.

"rostopic echo /joy" works well...but pioneer doesn't work..and "rostopic echo /cmd_vel" are blank when I push the joystick buttons. The robot just beeped at regular time period.

I'd like to know ..what the problem is?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-06-12 06:54:22 -0500

Seen: 1,143 times

Last updated: Jul 31 '12