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

How to set an estimated position without using rviz

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

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,

Lucas

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

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

DimitriProsser gravatar image

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

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.

header: 
  seq: 14
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: /base_link
pose: 
  pose: 
    position: 
      x: -5.48213577271
      y: -3.74665260315
      z: 0.0
    orientation: 
      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

Comments

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 -0600 )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 -0600 )edit
the xyzw is quaternion notation http://en.wikipedia.org/wiki/Quaternion
tfoote gravatar image tfoote  ( 2011-10-04 18:03:16 -0600 )edit
4

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

Lorenz gravatar image

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

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

Question Tools

1 follower

Stats

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

Seen: 1,064 times

Last updated: Oct 04 '11