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

Call set_pose service of robot_localization

asked 2014-11-27 04:07:04 -0600

ASoriano gravatar image

Hello, i'm trying to call the set_pose service provided from robot_localization node, from console. It expects a posewithcovatiancestamped type message. If I type: rosservice call /set_pose "{}", the tf is set to 0,0,0. But What If I need to set another pose?

Service arguments are: [pose.header.seq pose.header.stamp pose.header.frame_id pose.pose.pose.position.x pose.pose.pose.position.y pose.pose.pose.position.z pose.pose.pose.orientation.x pose.pose.pose.orientation.y pose.pose.pose.orientation.z pose.pose.pose.orientation.w pose.pose.covariance]

I tried things like: - rosservice call /summit_a/set_pose "[0 now /odom_ekf_frame 0 0 0 0 0 0 0 0 0]" but i don't find the key for this call. Thanks in advance and best regards

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2014-11-27 08:39:48 -0600

Tom Moore gravatar image

Tab completion works:

rosservice call /set_pose (now press tab)

yields

rosservice call /set_pose "pose:
  header:
    seq: 0
    stamp:
      secs: 0
      nsecs: 0
    frame_id: ''
  pose:
    pose:
      position: {x: 0.0, y: 0.0, z: 0.0}
      orientation: {x: 0.0, y: 0.0, z: 0.0, w: 0.0}
    covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]"

Just fill out those values with the values you want.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-11-27 04:07:04 -0600

Seen: 2,384 times

Last updated: Nov 27 '14