Ask Your Question

zsbhaha's profile - activity

2021-05-12 07:46:09 -0600 received badge  Nice Answer (source)
2016-07-27 18:16:22 -0600 marked best answer How can i use rviz to simulate my own robot-model

Hi community l am new to ros ,i have done many tutorials and read the book about ros ,e.x. ROS By Example.In that book,i do the example use Arbotix simulator step by step.But i can't understand what happened behind screen.i want to do something use my own robot-model in rviz.i have built up my robot in urdf . But i don't know what should i do the next.please see my questions below : to drive the model built by urdf in rviz

2.if any tutorial exists in

3.the different between rviz and gazebo ....

my English is not very well ....

i wish i have described my questions clear .

thanks everyone

2015-07-20 18:54:57 -0600 received badge  Teacher (source)
2014-10-18 22:02:40 -0600 received badge  Popular Question (source)
2014-10-18 22:01:09 -0600 received badge  Famous Question (source)
2014-09-08 05:07:48 -0600 received badge  Famous Question (source)
2014-08-08 04:19:11 -0600 received badge  Famous Question (source)
2014-07-31 12:15:48 -0600 received badge  Notable Question (source)
2014-07-18 19:15:09 -0600 received badge  Famous Question (source)
2014-07-05 01:32:00 -0600 received badge  Famous Question (source)
2014-05-30 05:20:19 -0600 received badge  Famous Question (source)
2014-05-14 21:02:22 -0600 answered a question move_base and extrapolation errors into the future

I have same problem with python scripts . when I instanced a TransformListener object , and immediately called the waitForTransform function , it would throw a Extrapolation .

see my question ,please punch here

the code like this:

listener = tf.TransformListener()

but After I referred to @Pi Robot scripts , I add a delay line to give tf some time to fill its buffer,like this:

listener = tf.TransformListener()
# Give tf some time to fill its buffer

and amazing happened . I hope it will help .

2014-05-13 19:52:07 -0600 received badge  Notable Question (source)
2014-05-13 15:08:15 -0600 commented question How to put the pieces together?

your question is so comprehensive that I cant answer . you should make your problem focusing on one point .

2014-05-13 04:20:32 -0600 received badge  Popular Question (source)
2014-05-13 03:30:13 -0600 commented question TF can't look up transform

Hi,@Tom Moore ,It ran on a same computer through ssh , I don't think it matters .

2014-05-13 03:30:13 -0600 received badge  Commentator
2014-05-13 03:24:03 -0600 received badge  Notable Question (source)
2014-05-13 03:23:05 -0600 commented answer TF can't look up transform

Hi,@dornhege ,I need to periodically transform to /map .That code is just a piece . How can I change the buffer size ?

2014-05-13 03:00:35 -0600 asked a question TF can't look up transform

Hello, all

I wrote a tf listener,and I need the transform between /map and /goal_in_picture. I'm also wrote a node broadcasting transform from /base_link to /goal_in_picture. The rest of tf provided by navigation stack. The TF tree like this:

  `map` ----->`odom` ----->`base_link`------>`base_laser`

Here is code aiming to look up transform from /map to /goal_in_picture:

...(wihle loop)
    now =
    trans,rot = listener.lookupTransform("/goal_in_picture","/map",now)
except (tf.LookupException, tf.ConnectivityException,tf.Exception):
    rospy.loginfo("tf tree error!")

but when preforming the first line , it throw a exception :

tf.Exception: Lookup would require extrapolation into past....

Also I ran tf command in terminal:

 rosrun tf tf_echo /map /goal_in_picture

It show me these message:

Failure at 1399971930.470803359
Exception thrown:Lookup would require extrapolation into the past.  Requested time 1399971930.383213043 but the earliest data is at time 1399971934.658835312, when looking up transform from frame [goal_in_picture] to frame [map]

The current list of frames is:
Frame base_link exists with parent odom.
Frame odom exists with parent map.
Frame base_laser exists with parent base_link.
Frame goal_in_picture exists with parent base_link.

At time 1399971934.778
- Translation: [0.803, -1.122, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.424, 0.906]
            in RPY [0.000, 0.000, -0.876]

Any idea ? Thanks in advance .

2014-05-12 03:33:24 -0600 received badge  Notable Question (source)
2014-05-12 01:15:15 -0600 commented answer how to correctly convert OccupancyGrid format message to image ?

Thank you; I'll check those resources out .

2014-05-11 23:18:23 -0600 received badge  Popular Question (source)
2014-05-11 20:47:25 -0600 commented answer how to correctly convert OccupancyGrid format message to image ?

Thank you; I'll check those resources out

2014-05-11 20:23:25 -0600 asked a question how to correctly convert OccupancyGrid format message to image ?


I want to convert OccupancyGrid format message to 'mono8' formt image. Actually,I subscribed /move_base/local_costmap/costmap topic ,but the result look like weird, compared with map showed in rviz,it was inversed and rotated . here is code relative converting proccess :

 def callback(self,data):
     self.width =
     self.height =
     self.resolution =
     self.length = len(
     #self.min_line = []

     #creat an mat to load costmap
     costmap_mat = cv.CreateMat(self.height,self.width,cv.CV_8UC1)

     for i in range(1,self.height):
         for j in range(1,self.width):

Any answer is appreciated .-


the code given by @Stefan Kohlbrecher shed light on my problem . It was wrong with order i-1 and j-1。here is modified code and it works,

for i in range(1,self.height):
            for  j in range(1,self.width):

Althrough my problem was solved , I am still confused that the sequence is self.height-1--->0 rather than 0--->self.height-1 .

2014-05-07 10:54:52 -0600 received badge  Notable Question (source)
2014-04-28 18:47:21 -0600 received badge  Popular Question (source)
2014-04-27 20:54:46 -0600 answered a question Robot running with gmapping can't achive given goal robot motor has some problem so that it can't walk forward along line . 2.After I called clear_unknown_space service , the robot's behavior looks well .

2014-04-25 01:37:02 -0600 commented question Robot running with gmapping can't achive given goal

@dornhege can you run your robot with gmapping ?

2014-04-25 01:35:03 -0600 commented question Robot running with gmapping can't achive given goal

no, and I have set trace_unkown_spcae as true .

2014-04-25 01:23:54 -0600 asked a question Robot running with gmapping can't achive given goal

Hello, every earnest folk

background : Anyone successfully let robot running with gmapping ? I have made my robot run with amcl and a given map , and it did something very well ,such as going to the goal ,avoiding obstacle . In recent , I want to run my robot with gmapping , and I use old base_local_planner and costmap (including local & global) parameter .

gmapping params : <node pkg="gmapping" type="slam_gmapping" name="gamapping">

  <param name="particles" value="50" />

  <param name="maxUrange" value="200"/>
  <param name="delta" value="0.05"/>
  <param name="maxrang" value="220" />

  <param name="srr" value="0.2" />
  <param name="srt" value="0.4" />
  <param name="str" value="0.2" />
  <param name="stt" value="0.4" />
  <param name="map_update_interval" value="0.3" />
  <param name="transform_publish_period" value="0.5" />

  <param name="linearUpdate" value="1" />
  <param name="angularUpdate" value="0.5" />


problem: robot can't achieve the goal given by rviz or rqt plugin written by myself . When I set a goal ,robot always performs recovery behaviors ,but the area around robot don't have any obstacle ,and the map showed in rviz is clean .

question 1: Are there some parameters about move_base need to be modified ?

question 2: In theory robot can running with gmapping , But in practically ... ?

ps: ubuntu 12.04 & groovy

2014-04-20 06:57:22 -0600 marked best answer control loop lose its desired rate

###Hi,every earnest fork## In the past of couples weeks, I have been tuning robot's navigation. But it still have some troubles when going to nav goals even with a static map.

One of those question is control loop always lose its desire rate. When I use my own notebook on the robot, I set control frequency = 8Hz, and it runs good, but when I use another computer, the warning always jump onto screen. I know the reason is either the latter computer sucked or some parameter was not properly set.

Here it is the key configuration about the latter computer

Intel Atom D2550 1.86GHz


and base_local_planner parameter

controller_frequency: 8
recovery_behavior_enabled: true
clearing_rotation_allowed: true

   max_vel_x: 0.55
   min_vel_x: 0.25
   max_vel_theta: 1.2
   min_vel_theta: -1.2
   min_in_place_vel_theta: 0.9
   escape_vel: -0.4
   acc_lim_x: 2.0
   acc_lim_y: 2.0
   acc_lim_theta: 2.5

   holonomic_robot: false
   yaw_goal_tolerance: 0.3 # about 18 degrees
   xy_goal_tolerance: 0.2  # 10 cm
   latch_xy_goal_tolerance: true
   pdist_scale: 0.8
   gdist_scale: 0.4
   meter_scoring: true

   heading_lookahead: 0.5
   heading_scoring: true
   heading_scoring_timestep: 0.8
   occdist_scale: 0.3
   oscillation_reset_dist: 0.1
   publish_cost_grid_pc: true
   prune_plan: true

   sim_time: 2.0
   sim_granularity: 0.04
   angular_sim_granularity: 0.025
   vx_samples: 18
   vtheta_samples: 30
   dwa: true
   simple_attractor: false
2014-04-19 18:50:35 -0600 commented answer rqt plugin not listed/found in list returned by "rqt --list-plugins"

Thank you very much ! The problem had confused me a long time .

2014-04-17 07:23:25 -0600 received badge  Popular Question (source)
2014-04-16 06:37:58 -0600 received badge  Student (source)
2014-04-16 02:14:25 -0600 asked a question What does the sim_time mean ?

Hello , every earnest folk

The question what headline states has confused me a long time . I can't understand that parameter's meaning. I have seen introduction from here many times ,But it still puzzles me .In my opinion ,sim_granularity and vx_sample have decided the distance should be forward_simulated .So ,what does the sim_time mean ?