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

contacs in gazebo, how can i get information?

asked 2013-02-13 08:41:02 -0600

joseescobar60 gravatar image

updated 2013-02-18 03:06:51 -0600

Hello, i'm working with the shadow_hand and i need to report to rosserial when a collision is ocurs, i read the bumper topic of the shadow_hand and i got this when it collides:

header:  
  seq: 32213
  stamp: 
    secs: 323
    nsecs: 183000000
  frame_id: thdistal
states: 
  - 
    info: touched!    i:0      my geom:thdistal_geom   other geom:ffdistal_geom         time:0

    geom1_name: thdistal_geom
    geom2_name: ffdistal_geom
    wrenches: 
      - 
        force: 
          x: 4.3224521471
          y: 1.03446840909
          z: -4.10399759546
        torque: 
          x: 0.020471011108
          y: -0.0704609036724
          z: 0.00380004778994
      - 
        force: 
          x: 0.218667846282
          y: 0.0309026136255
          z: -0.0121754547746
        torque: 
          x: 0.000148457520029
          y: -0.00092394338305
          z: 0.000321188888893
      - 
        force: 
          x: 0.507403457155
          y: -0.273770831104
          z: 0.651734260347
        torque: 
          x: -0.00465900581856
          y: 0.00322243770582
          z: 0.00498087227518
      - 
        force: 
          x: 2.09702680594
          y: 2.17188347437
          z: 5.60188694761
        torque: 
          x: -0.00900784497789
          y: 0.0434630563714
          z: -0.0134788513589
      - 
        force: 
          x: 0.0720124172761
          y: 0.0334745991228
          z: -0.0159559391101
        torque: 
          x: 0.000225967252471
          y: -0.000490346770889
          z: -8.88155250662e-06
      - 
        force: 
          x: 3.2662882499
          y: 0.318637888692
          z: 0.714946180364
        torque: 
          x: 4.27054304811e-05
          y: -0.0203223290465
          z: 0.0088621716556
      - 
        force: 
          x: 0.680392560856
          y: 0.357548214436
          z: -0.783138309864
        torque: 
          x: 0.00600982609405
          y: -0.0140739668651
          z: -0.00120423269345
      - 
        force: 
          x: 0.0
          y: 0.0
          z: 0.0
        torque: 
          x: 0.0
          y: 0.0
          z: 0.0
      - 
        force: 
          x: 1.55918968855
          y: 0.98712114709
          z: -0.973108019467
        torque: 
          x: 0.0116720300575
          y: -0.0176844346929
          z: 0.000762741068342
      - 
        force: 
          x: 0.46194743699
          y: 0.362383244229
          z: 0.451829982357
        torque: 
          x: -0.000599976646105
          y: 0.00124312806077
          z: -0.000383620194539
      - 
        force: 
          x: -0.0586835618484
          y: 0.26589764374
          z: 1.09729838499
        torque: 
          x: -0.0059069979361
          y: 0.00997637611493
          z: -0.00273338466708
      - 
        force: 
          x: 2.36895693935
          y: -2.56130836999
          z: 3.05197056786
        torque: 
          x: -0.0380587131468
          y: 0.0111600774632
          z: 0.0389072731168
      - 
        force: 
          x: 0.0
          y: 0.0
          z: 0.0
        torque: 
          x: 0.0
          y: 0.0
          z: 0.0
      - 
        force: 
          x: 0.56934854374
          y: -0.17676679203
          z: -0.858212862599
        torque: 
          x: 0.003751591892
          y: -0.0125359753112
          z: 0.00507089524148
      - 
        force: 
          x: 1.28301576945
          y: 0.551718642647
          z: 0.64047026706
        torque: 
          x: 0.00181023379415
          y: -0.000367597434431
          z: -0.00330967455595
      - 
        force: 
          x: 1.14870859689
          y: 0.152724584719
          z: -0.136082267531
        torque: 
          x: 0.00108981350612
          y: -0.00768278607279
          z: 0.000577061453127
      - 
        force: 
          x: 0.0358387435776
          y: 0.0221442090706
          z: -0.00445491188319
        torque: 
          x: 0.000168238162743
          y: -0.00028679324501
          z: -7.21372748657e-05
      - 
        force: 
          x: 1.9632958016
          y: -2.58801057004
          z: -4.996901362
        torque: 
          x: 0.00130183684946
          y: -0.0606580206032
          z: 0.0319276843271
    total_wrench: 
      force: 
        x: 20.4958614428
        y: 0.689048107657
        z: 0.326109867906
      torque: 
        x: -0.0115408268584
        y: -0.136422021381
        z: 0.0740191535192
    contact_positions: 
      - 
        x: -0.0104273699182
        y: -0.00341480415094
        z: 0.00820062023106
      - 
        x: -0.0103267587404
        y: -0.00296201608504
        z: 0.0109240175366
      - 
        x: -0.0102857106122
        y: -0.00428225274012
        z: 0.00766292789126
      - 
        x: -0.00961456291088
        y: -0.00439229942925
        z: 0.00989537536603
      - 
        x: -0.0104734449257
        y: -0.00378451860515
        z: 0.00597461133379
      - 
        x: -0.00876281989568
        y: -0.00610283155787
        z: 0.00866518172029
      - 
        x: -0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-02-18 21:50:57 -0600

Ugo gravatar image

updated 2013-02-19 02:48:32 -0600

This is the default ROS message for a bumper. If you prefer to have a data that's easier to interpret, you can use the sr_tactile_sensors package.

You'll first need to compile the package for Gazebo:

GAZEBO=1 rosmake sr_tactile_sensors

Then you can launch the node (once gazebo is running):

roslaunch sr_tactile_sensors sr_tactile_gazebo.launch

This will provide you with 5 different topics: /sr_tactile/touch/ff, /sr_tactile/touch/mf, /sr_tactile/touch/rf, /sr_tactile/touch/lf, /sr_tactile/touch/th. They each contain a double that is proportional to the amount of force applied on the finger tip.

edit flag offensive delete link more

Comments

Well, thank's for the info, i did what you said, i run the firts line and it compiles good, but the topics doesn't appear.

joseescobar60 gravatar image joseescobar60  ( 2013-02-19 02:39:51 -0600 )edit

sorry, corrected my answer: you need to launch the tactile node for gazebo once you have the hand running. My mistake.

Ugo gravatar image Ugo  ( 2013-02-19 02:49:28 -0600 )edit

when i launch roslaunch sr_tactile_sensors sr_tactile_gazebo.launch it suppouse that charge the hand or just the topics?

joseescobar60 gravatar image joseescobar60  ( 2013-02-19 02:53:57 -0600 )edit

OK @Ugo i really thank you, it works very fine, thank you!

joseescobar60 gravatar image joseescobar60  ( 2013-02-19 02:56:18 -0600 )edit

glad to help

Ugo gravatar image Ugo  ( 2013-02-19 03:00:30 -0600 )edit

Question Tools

Stats

Asked: 2013-02-13 08:41:02 -0600

Seen: 242 times

Last updated: Feb 19 '13