0
$\begingroup$

Gazebo Answers logo

As mentioned in my other question, the Gazebo tutorial for 1.5.0 on the contact sensor isn't working for me. I've now tried it on two separate computers -- one of which has a brand new install of Gazebo 1.5. I've gone up to (and including) the step with gztopic echo /gazebo/default/box/link/my_contact. Nothing shows up. Not when I move the box around, not when I drag other cubes into it. Nothin'.

I was also having problems with the ray sensor. Andrei said it worked fine on his copy which is installed from source. I'm wondering if this is related.

Has anyone gotten this to work on a repo-installed version of Gazebo 1.5.0?

My output for the gztopic list command (while running contact.world):

$ gztopic list
/gazebo/default/pose/info
/gazebo/default/gui
/gazebo/default/log/status
/gazebo/default/response
/gazebo/default/world_stats
/gazebo/default/selection
/gazebo/default/model/info
/gazebo/default/light
/gazebo/default/physics/contacts
/gazebo/default/visual
/gazebo/default/request
/gazebo/default/joint
/gazebo/default/sensor
/gazebo/default/box/link/my_contact
/gazebo/world/modify
/gazebo/default/diagnostics
/gazebo/default/factory
/gazebo/default/model/modify
/gazebo/default/scene
/gazebo/default/physics
/gazebo/default/world_control
/gazebo/server/control

and for echoing the topic:

$ gztopic echo /gazebo/default/box/link/my_contact
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179

Also, I should mention that echoing the /gazebo/default/diagnostics gives what, I think, is expected:

$ gztopic echo /gazebo/default/diagnostics
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179
real_time {
  sec: 545
  nsec: 278030788
}
sim_time {
  sec: 543
  nsec: 639000000
}
real_time_factor: 0.99699413700000006

real_time {
  sec: 545
  nsec: 279033152
}
sim_time {
  sec: 543
  nsec: 640000000
}
real_time_factor: 0.99699413900000011
...

Echoing /gazebo/default/physics/contacts gives:

$ gztopic echo /gazebo/default/physics/contacts
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179
contact {
  collision1: "box::link::box_collision"
  collision2: "ground_plane::link::collision"
  position {
    x: -0.500000000000538
    y: 0.5000000000027871
    z: -1.3116396857526524e-11
  }
  position {
    x: 0.499999999999462
    y: 0.50000000000861855
    z: -1.3116396854834858e-11
  }
  normal {
    x: 0
    y: 0
    z: 1
  }
  normal {
    x: 0
    y: 0
    z: 1
  }
  depth: 1.3116396857526524e-11
  depth: 1.3116396854834858e-11
  wrench {
    body_1_name: "box::link::box_collision"
    body_2_name: "ground_plane::link::collision"
    body_1_force {
      x: -2.3140274425398203e-05
      y: -0.58800230164949263
      z: 2.9400153497970845
    }
    body_2_force {
      x: 0
      y: 0
      z: 0
    }
    body_1_torque {
      x: 1.1760044495821824
      y: 1.4700192450579339
      z: 0.29401272095006686
    }
    body_2_torque {
      x: 0
      y: 0
      z: 0
    }
  }
  wrench {
    body_1_name: "box::link::box_collision"
    body_2_name: "ground_plane::link::collision"
    body_1_force {
      x: 2.3140281286035522e-05
      y: -0.58800230164948963
      z: 2.940015349797072
    }
    body_2_force {
      x: 0
      y: 0
      z: 0
    }
    body_1_torque {
      x: 1.176004449599322
      y: -1.4700192450442133
      z: -0.29401272095006692
    }
    body_2_torque {
      x: 0
      y: 0
      z: 0
    }
  }
  time {
    sec: 9
    nsec: 22000000
  }
}
time {
  sec: 9
  nsec: 22000000
}
...

Originally posted by Ben B on Gazebo Answers with karma: 175 on 2013-03-26

Post score: 0


Original comments

Comment by Ben B on 2013-03-26:
Welp. Installing from source didn't fix it either.

Comment by scpeters on 2013-03-27:
We had two people at OSRF test each tutorial with the new debs before releasing, so yes we have gotten it to work. Can you paste the full output of what you see when you run gztopic list?

Comment by Ben B on 2013-03-27:
Updated with the outputs for listing the topics as well as echoing the sensor topic. Thanks for your attention, sc.

Comment by iche033 on 2013-03-28:
can you turn on contact visualization and also make the models transparent (via the View menu) first, then place a sphere on top of the box contact sensor to see if a single contact point visualization appear?

Comment by Ben B on 2013-03-28:
Iche, I see one contact point between the box and the sphere. Also one contact point at every corner of the box that touches the ground.

Comment by Ben B on 2013-03-28:
Also, something that may be noteworthy: When I visualize collisions and I move the box from its original position, an orange square remains on the ground where the box was.

Comment by Ben B on 2013-03-28:
When I go to Window -> Topic Visualization and select /gazebo/default/box/link/my_contact, the reported frequency is 0.00 Hz and the bandwidth is 0.00 B/s. What do you guys see here?

Comment by scpeters on 2013-03-28:
The orange square on the ground represents the collision shape of the ground plane. Can you also View Contacts and View Transparent?

Comment by Ben B on 2013-03-28:
scpeters, that's what "Iche, I see one contact point between the box and the sphere. Also one contact point at every corner of the box that touches the ground." was in regards to.

Comment by iche033 on 2013-03-29:
do you see anything if you echo /gazebo/default/physics/contacts ?

Comment by Ben B on 2013-03-29:
Iche, I've updated the question to show the start of the output I get from that.

Comment by Ben B on 2013-03-29:
Iche, I've updated the question to show the start of the output I get from that.ls

Comment by scpeters on 2013-03-29:
On my machine, an active contact sensor will output time-stamps regularly even if there are no contacts to report. This seems like a sensor problem. I just tested the world file in the tutorial and it works fine for me. Are you using debs or a source build?

Comment by Ben B on 2013-03-29:
I've tried both. When the debs didn't work, I installed from source. "When I go to Window -> Topic Visualization and select /gazebo/default/box/link/my_contact, the reported frequency is 0.00 Hz and the bandwidth is 0.00 B/s. What do you guys see here?"

Comment by scpeters on 2013-03-29:
I get about 33 Hz and 800 kB/s.

Comment by Ben B on 2013-03-29:
Do we know if those are parameters that are set to get the sensor to scan, or are these outputs from the sensor?

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Solution: One needs to add

<update_rate>5</update_rate>

Between the and tags in order to get output on the terminal. The rate "5" can be changed to a different frequency if desired. I've added this to the tutorial page on the wiki here.


Originally posted by Ben B with karma: 175 on 2013-04-09

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.