Ask Your Question

Can't vizualise Pose in Rviz

asked 2019-12-07 23:59:39 -0500

TenderTadpole7 gravatar image

I'm trying to implement a path planning algorithm on a static image. I have obtained an occupancy grid and have also published a point via geometry_msgs/PoseStamped, but i cannot visualize this on Rviz .

This is the publisher that Ive written

pub = rospy.Publisher('move_base_simple/goal',PoseStamped,queue_size=1)
rospy.init_node('pose_publisher',anonymous = True)
rate = rospy.Rate(1)
while not rospy.is_shutdown():
    p = PoseStamped()
    p.header.seq = 1
    p.header.stamp =
    p.header.frame_id = 'map'
    p.pose.position.x = 100
    p.pose.position.y = 100
    p.pose.position.z = 0
    p.pose.orientation.x = 0
    p.pose.orientation.x = 0
    p.pose.orientation.x = 0
    p.pose.orientation.w = 1

What am i doing wrong

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-08 00:03:48 -0500

TenderTadpole7 gravatar image

After increasing the scale of the pose arrow i was able to vizualise it

edit flag offensive delete link more


Seems you've already figured it out, but just the draw some attention to it:

p.pose.position.x = 100
p.pose.position.y = 100

This places the PoseStamped at 100 metres in the X direction and 100 metres in the Y direction.

While of course perfectly valid, it is quite a distance.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-08 02:25:15 -0500 )edit

Thanks for bringing this to my attention, I hadn't noticed that this was in meters

TenderTadpole7 gravatar image TenderTadpole7  ( 2019-12-08 11:21:11 -0500 )edit

As everything in ROS, PoseStamped uses SI units. See also REP-103: Standard Units of Measure and Coordinate Conventions.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-08 11:57:13 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2019-12-07 23:56:07 -0500

Seen: 106 times

Last updated: Dec 07 '19