Ask Your Question

How to set an estimated position without using rviz

asked 2011-10-03 06:01:10 -0500

lucascoelho gravatar image

In my project, I want to use multiple turtlebots to navigate in a previously known map to patrol an area. My netbooks uses 2GB of RAM and an Atom N455 processor - it is not so good as D525, but i think it could make some things on ROS... I noticed that rviz and another graphic processes requires a lot of processing and video resources, so I want to avoid using rviz and those processes, because I don't need graphical resources. But how can I set a estimated position of the robots without using rviz? And do you believe that my current netbook (Atom N455 and 2GB RAM) can support an autonomous navigation?

Thanks in advance,


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-10-03 06:22:02 -0500

DimitriProsser gravatar image

updated 2011-10-04 01:32:59 -0500

You could try using one of the lightweight rviz alternatives for machines with little graphics power. Those can be found here.

Additionally, you could create your own initialpose message and publish it to amcl that way (if you know the robot's pose). The initialpose message is of the type geometry_msgs/PoseWithCovarianceStamped.

EDIT: For this message type, the seq field is filled in by ROS automatically, and the stamp is zero, so you can ignore both of those fields. The frame_id is /base_link. Finally, the covariance is a 6x6 matrix that is filled in with set values. I've provided an example message below that was taken straight from Rviz.

  seq: 14
    secs: 0
    nsecs: 0
  frame_id: /base_link
      x: -5.48213577271
      y: -3.74665260315
      z: 0.0
      x: 0.0
      y: 0.0
      z: 0.457581479883
      w: 0.889167694683
  covariance: [0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 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.06853891945200942, 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]
edit flag offensive delete link more


I really appreciate your help! But... how can I use that message type? I did not understood what should I use in covariance, seq, stamp and frame_id... And which node does the position of the robot is published?
lucascoelho gravatar image lucascoelho  ( 2011-10-03 11:32:38 -0500 )edit
Thanks again! W is the scalar part, isn't? And is the covariance matrix filled by ROS? Or should I always use those values?
lucascoelho gravatar image lucascoelho  ( 2011-10-04 08:17:21 -0500 )edit
the xyzw is quaternion notation
tfoote gravatar image tfoote  ( 2011-10-04 18:03:16 -0500 )edit

answered 2011-10-03 08:30:01 -0500

Lorenz gravatar image

updated 2011-10-03 08:31:50 -0500

Normally, people don't run rviz on the computers on their robots. Instead, they use another laptop/desktop computer and set the environment variable ROS_MASTER_URI to the robot before running rviz. Example:

export ROS_MASTER_URI=http://turtlebot1:11311
rosrun rviz rviz

In the above example, the robot has the domain turtlebot1. You can also just use an ip address there or set up your hosts file as explained here.

If you really need an alternative to rviz, see DimitriProsser's answer.

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

1 follower


Asked: 2011-10-03 06:01:10 -0500

Seen: 890 times

Last updated: Oct 04 '11