ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

problem using rostopic pub

asked 2013-08-05 04:45:57 -0500

rem870 gravatar image

Hi

i am trying to use rostopic pub to control the motors from the keyboard. i try to publish to the subscribed topic /katana_arm_controller/joint_movement_action/goal but i have to type header,goal_id , goal which i don't know. i tried to read the published

/katana_arm_controller/joint_movement_action/result but i get error message ERROR: Cannot load message class for [katana_msgs/JointMovementActionResult]. Are your messages built?

what should i do?

thanks

edit retag flag offensive close merge delete

Comments

Is the package path in `$ROS_PACKAGE_PATH` variable? Does the package have msg folder within?

gustavo.velascoh gravatar image gustavo.velascoh  ( 2013-08-05 05:16:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-08-05 05:32:57 -0500

BennyRe gravatar image

updated 2013-08-05 07:41:32 -0500

Have you tried useing the auto complete function by pressing tab. Every time I wanted to control our Katana I got the raw message by pressing tab. I just had to add the joint names and joint values.

Here's what I did: Type: rostopic pub /katana_arm_controller/joint_movement_action/goal katana_msgs/JointMovementActionGoal <now hit="" tab="">

now you should see a raw/empty message.

Note that auto complete does not work for me if I added -1 after "pub". I had to add it after pressing tab.

This command works for me:

rostopic pub -1 /katana_arm_controller/joint_movement_action/goal katana_msgs/JointMovementActionGoal "header:
seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  jointGoal:
    header:
      seq: 0
      stamp: {secs: 0, nsecs: 0}
      frame_id: ''
    name: ['katana_motor1_pan_joint', 'katana_motor2_lift_joint', 'katana_motor3_lift_joint', 'katana_motor4_lift_joint', 'katana_motor5_wrist_roll_joint']
    position: [-1.0025087725759727064, -0.304799451742457883, 0.703302076077451588, -0.0062867086188651555, -1.00085111164]
    velocity: [0]
    effort: [0]"

Moving the gripper also does not work.

edit flag offensive delete link more

Comments

Hi, thanks for your answer i left everything as is except from name: ['katana_motor1_pan_joint,'] position: [-1.69906439143] which i copied from a previus reading of positions and it worked thanks

rem870 gravatar image rem870  ( 2013-08-05 07:12:19 -0500 )edit
1

@rem870 please accept the question using the checkbox at the left so others know this worked for you.

tfoote gravatar image tfoote  ( 2013-08-05 14:11:51 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2013-08-05 04:45:57 -0500

Seen: 1,259 times

Last updated: Aug 05 '13