Home | Tutorials | Wiki | Issues
Ask Your Question

Daehyung Park's profile - activity

2017-06-13 04:54:39 -0600 received badge  Favorite Question (source)
2015-11-08 10:14:35 -0600 marked best answer What is the meaning of contacts returned from GetContact (contact sensor)?

When I use Contact sensor in Gazebo 1.3, I am basically using following code.

  // Get all the contacts.
  msgs::Contacts contacts;
  contacts = this->parentSensor->GetContacts();
  for (int i = 0; i < contacts.contact_size(); ++i)
  {
    for (int j = 0; j < contacts.contact(i).position_size(); ++j)
    {
      std::cout << j << "  Position:"
                << contacts.contact(i).position(j).x() << " "
                << contacts.contact(i).position(j).y() << " "
                << contacts.contact(i).position(j).z() << "\n";
    }
  }

The 'GetContacts' function returns many contact informations (in my case, contact_size was 30~50). And each contact includes a bunch of contact positions. I have looked the position data. All contacts includes quite similar position data.

What is the difference between contacts? Is it a group of contact points by position?

I thought if there is two bodies and two contact points between bodies, the contact_size is 2 and each contact includes a bunch of positions that are located in each contact point. Am I correct?

===== Update 1 ======

I use following two objects

  1. PR2's upper arm part

    <link name='l_upper_arm_roll_link'>
      <self_collide>0</self_collide>
      <gravity>0</gravity>
      <pose>0.050000 0.188000 0.790675 0.000000 -0.000000 0.000000</pose>
      <inertial>
        <mass>6.117690</mass>
        <pose>0.210551 0.016309 -0.000561 0.000000 -0.000000 0.000000</pose>
        <inertia>
          <ixx>0.025306</ixx>
          <ixy>-0.003393</ixy>
          <ixz>0.000608</ixz>
          <iyy>0.084737</iyy>
          <iyz>-0.000200</iyz>
          <izz>0.086016</izz>
        </inertia>
      </inertial>
      <collision name='l_upper_arm_roll_link_geom'>
        <geometry>
          <mesh>
            <uri>model://pr2_arm/meshes/shoulder_v0/upper_arm_roll_L.stl</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name='l_upper_arm_roll_link_geom_visual'>
        <geometry>
          <mesh>
            <uri>model://pr2_arm/meshes/shoulder_v0/upper_arm_roll.stl</uri>
          </mesh>
        </geometry>
      </visual>
      <collision name='l_upper_arm_roll_link_geom_l_upper_arm_link'>
        <geometry>
          <mesh>
            <uri>model://pr2_arm/meshes/upper_arm_v0/upper_arm.stl</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name='l_upper_arm_roll_link_geom_l_upper_arm_link_visual'>
        <geometry>
          <mesh>
            <uri>model://pr2_arm/meshes/upper_arm_v0/upper_arm.dae</uri>
          </mesh>
        </geometry>
      </visual>
      <sensor name='l_upper_arm_roll_tactile_sensor' type=contact>
        <contact>
          <collision>l_upper_arm_roll_link_geom_l_upper_arm_link</collision>
          <topic>__default_topic__</topic>
        </contact>
        <plugin name="ros_tactile_plugin" filename="libros_tactile_plugin.so" />
        <always_on>1</always_on>
        <update_rate>100.0</update_rate>
        <visualize>false</visualize>
      </sensor>
      <velocity_decay/>
    </link>
    
  2. Desk

    <link name="link">
      <inertial>
        <mass>50.0</mass>
      </inertial>
      <collision name="surface">
        <pose>0 0 0.6 0 0 0</pose>
        <geometry>
          <box>
            <size>1.5 0.8 0.03</size>
          </box>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>500.000000</mu>
              <mu2>500.000000</mu2>
              <slip1>0.000000</slip1>
              <slip2>0.000000</slip2>
            </ode>
          </friction>
          <contact>
            <ode>
              <soft_cfm>0.04</soft_cfm>
              <soft_erp>0.9</soft_erp>
              <kp>50000.0</kp>
              <kd>1.000</kd>
              <max_vel>10.000000</max_vel>
              <min_depth>0.000000</min_depth>
            </ode>
          </contact>
        </surface>
      </collision>
      <visual name="surface">
        <pose>0 0 0.6 0 0 0</pose>
        <geometry>
          <box>
            <size>1.4 0.8 0.04</size>
          </box>
        </geometry>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Wood</name>
          </script>
        </material>
      </visual>
    

As we can see, one is mesh object and another one is a box. Could you kindly answer followings?

1. Each triangle of the mesh gives one contact object like 'contacts.contact(0)' when a box and the triangle collide.
2. One contact object ... (more)

2015-10-31 12:30:58 -0600 marked best answer No ealier segments error. Gazebo 1.3

I am implementing gazebo-1.3 ros-plugin for PR2.

Now, PR2 moves well, but my contact sensor plugin does not countinuously give collision-rostopic like collision-gztopic.

I found following error message from terminal.

[ERROR] [1358114072.409449185]: No ealier segments. First segment starts at 27.536 (now=27.534)

I could not find which plugin gives this error, but after appearing this message, my contact plugin does not publish any topics.

Is there anybody knows the meaning of this error message?

Thanks

2015-10-31 12:30:56 -0600 marked best answer Gazebo 1.2~1.3 Plugin for ROS

I am trying to use PR2 with new gazebo 1.3 on ubuntu 12.04 and ros-fuerte. The specific purpose is to test contact sensors all over the robot surface (tactile sensing).

As long as I know gazebo 1.3 is stand alone program, so I need ROS-Enabled Gazebo Model Plugin for PR2.

From below link's answer, I read that there is no plugin for PR2 now. If my understanding is correct, I have to make my own plugin over entire PR2 functions. Is it correct? or Does it mean impossible to make the plugin for ros now?

http://answers.gazebosim.org/question/112/error-from-launching-pr2launch/

Thanks

2015-10-31 12:30:16 -0600 marked best answer launching urdf model from Gazebo1.7.6+ROS Fuerte

I am trying to spawn any models through Gazebo1.7.6+ROS Fuerte. But gazebo does not spawn anything. Here is my sequence.

1) roscore 2) roslaunch gazeboworlds emptyworld.launch 3) rosrun gazebo spawn_model -file pwd/desk1.model -gazebo -z 1 -model box

From (3), just waiting with following message,

[INFO] [WallTime: 1356233674.397032] [0.000000] waiting for service /gazebo/spawn_gazebo_model

From (2), I got

... logging to /home/pidi/.ros/log/d4a6155e-4cae-11e2-ba92-9c4e36943400/roslaunch-pidi7-8753.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://pidi7:47191/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    gazebo (gazebo/gazebo)
    gazebo_gui (gazebo/gui)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo-1]: started with pid [8773]
Gazebo multi-robot simulator, version 1.2.5
Copyright (C) 2012 Nate Koenig, John Hsu, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo_gui-2]: started with pid [8780]
Gazebo multi-robot simulator, version 1.2.5
Copyright (C) 2012 Nate Koenig, John Hsu, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Warning [parser.cc:358] Converting a deprecatd SDF source[/home/pidi/workspace/simulator_gazebo/gazebo_worlds/worlds/empty.world].
  Version[1.0] to Version[1.2]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]
Warning [Converter.cc:191] Deprecated SDF Values in original file:
<background rgba='0.5 0.5 0.5 1'

Warning [Converter.cc:191] Deprecated SDF Values in original file:
<background

Msg Waiting for master[ INFO] [1356232460.536994870]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...

Msg Connected to gazebo master @ http://localhost:11345
Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
[ INFO] [1356232462.211541328, 0.001000000]: joint trajectory plugin missing <updateRate>, defaults to 0.0 (as fast as possible)
[ INFO] [1356232462.234273210, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1356232462.262465099, 0.050000000]: Starting to spin physics dynamic reconfigure node...
Warning [parser.cc:374] Gazebo SDF has no <gazebo> element in file[data-string]
Error [World.cc:1190] Unable to read sdf string

As long as I comfirmed through rosservice list, '/gazebo/spawngazebomodel' service exists. I also tried many other urdf files, but results are same.

I also followed http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation, but it was also same.

Does anybody have idea?

2015-10-31 12:28:16 -0600 marked best answer The order of collision1~2 objects from contact sensor

From contact sensor, we can get contact objects (gazebo::physics::Contact).

The contact object includes followings.

std::string     collision1
    Name of the first collision object.

std::string     collision2
    Name of the second collision object.

How does Gazebo decide the order ?

And, how about following? Assumption:

(1) There is a contact between link_1 and link_2, 
(2) link_1 has contact sensor.

Among the resulted contact objects from sensor, if the objects' elements are like following,

 (1) collision1 specifies link_1
 (2) collision2 specifies link_2

wrench(i).body1force in those objects are forces from link2 to link1. Am I right?

The '1,2' things make me really confused. I really need help. Thanks.

2015-10-31 12:24:55 -0600 marked best answer How to convert world contact positions to robot's local coordinate?

I am implementing contact plugin on PR2. I found the contact sensor returns contact positions based on world coordinate.

Since robot can move around and my controller only accepts contact positions based of torsoliftlink coordinate, I need to convert the position from world to local. Is there any method for it?

Thanks

2015-03-02 04:01:25 -0600 received badge  Famous Question (source)
2015-01-28 22:38:56 -0600 received badge  Famous Question (source)
2014-10-10 11:58:46 -0600 received badge  Famous Question (source)
2014-07-03 07:27:16 -0600 received badge  Notable Question (source)
2014-07-03 07:27:16 -0600 received badge  Popular Question (source)
2014-05-01 01:31:14 -0600 received badge  Notable Question (source)
2014-05-01 01:31:14 -0600 received badge  Popular Question (source)
2014-01-07 13:48:22 -0600 answered a question Contact sensor generates no contact information using gazebo_ros_bumper plugin

First of all, you can check there is really collision or not through gztopic echo "~~~".

In the topic list, there might be some "physics/contacts" exists. If you echo that, you can see whether "bumperbasecollision" element really generate collision or not. After that, you can also check other "contacts" topic and the sensor topics.

PS. your sensor refers "bumperbasecollision>". Probably, I think ">" is typo.

2014-01-07 13:24:27 -0600 received badge  Famous Question (source)
2014-01-07 13:16:59 -0600 asked a question two collision elements with two contact sensors on one link

I am using GAZEBO 1.8.7. (In this moment, I cannot move on new version.)

I have a link with two collision elements and I placed two contact sensors for those collision elements. Each sensor works fine if I remove another sensor.

Here is my gztopic list.

/gazebo/darci_fixed_cylinder/physics/contacts
/gazebo/darci_fixed_cylinder/Darci/handmount_LEFT/contacts
/gazebo/darci_fixed_cylinder/Darci/handmount_LEFT/handmount_LEFT_tactile_sensor
/gazebo/darci_fixed_cylinder/Darci/handmount_LEFT/flipper_tactile_sensor

handmount_LEFT link has two sensors. Each sensor refers different collision elements. No matter how there are contacts for those two elements, the last sensor does not publish any thing at all. "/handmount_LEFT/contacts" also does not give any contact information for the last collision element.

However, interestingly, "physics/contacts" gives contact information for both. If looks like that one link can use only one contact sensor no matter how there are two or more sensors. Is it correct?

Thanks.

2013-07-24 09:48:07 -0600 received badge  Famous Question (source)
2013-07-24 09:34:35 -0600 commented question How to update screen after SetWorldPose in Gazebo v1.8.6

I am not sure whether it is same or not. But, it looks very similar. I have used Gazebo v1.4.6 and seen this problem. It happens randomly but so much frequently.

2013-07-23 17:18:01 -0600 asked a question How to update screen after SetWorldPose in Gazebo v1.8.6

I am working on Gazebo v1.8.6 with ROS-Fuerte and PR2.

While I am running my robot, I manipulate some objects using 'gazebo::physics::Entity::SetWorldPose.'

My problem is the following; non-static objects are visually updated correctly after its' position manipulation. However, static objects are not visually updated (its' actual position is changed and there is contact on expected location.)

I can see this kind of situation 9 out of 10 simulations.

Is there any way to force to update screen except 'ConnectWorldUpdateBegin'?

Thanks

2013-07-08 03:35:58 -0600 received badge  Famous Question (source)
2013-06-26 14:29:07 -0600 received badge  Teacher (source)
2013-06-07 04:39:03 -0600 received badge  Notable Question (source)
2013-05-10 10:59:00 -0600 received badge  Famous Question (source)
2013-03-23 12:23:48 -0600 received badge  Notable Question (source)
2013-03-23 12:23:48 -0600 received badge  Popular Question (source)
2013-03-15 14:35:08 -0600 received badge  Popular Question (source)
2013-02-17 16:40:55 -0600 received badge  Taxonomist
2013-02-15 09:59:11 -0600 received badge  Notable Question (source)
2013-02-13 15:12:14 -0600 received badge  Famous Question (source)
2013-02-13 15:12:14 -0600 received badge  Notable Question (source)
2013-02-13 15:12:14 -0600 received badge  Popular Question (source)
2013-02-11 21:18:47 -0600 received badge  Popular Question (source)
2013-02-11 21:18:47 -0600 received badge  Notable Question (source)
2013-02-08 16:52:38 -0600 commented answer Google Protobuf Version between Gazebo 1.3 and Gazebo 1.4

I cleanup and recompiled using 2.4. Now, it works fine! Thanks.

2013-02-06 20:51:11 -0600 received badge  Notable Question (source)
2013-02-06 20:51:11 -0600 received badge  Famous Question (source)
2013-02-06 20:51:11 -0600 received badge  Popular Question (source)
2013-02-06 07:20:00 -0600 received badge  Popular Question (source)
2013-02-06 07:20:00 -0600 received badge  Notable Question (source)
2013-02-05 09:50:46 -0600 received badge  Popular Question (source)
2013-02-04 14:59:23 -0600 asked a question Google Protobuf Version between Gazebo 1.3 and Gazebo 1.4

I am migrating from Gazebo 1.3.1 to Gazebo 1.4 now.

My google protoc version is 2.4.1. It was fine with Gazebo 1.3.1

But, I got problem after installing Gazebo 1.4. When I compiling my plugin, I always got following errors.

/usr/local/include/gazebo-1.4/gazebo/msgs/topic_info.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
/usr/local/include/gazebo-1.4/gazebo/msgs/topic_info.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
/usr/local/include/gazebo-1.4/gazebo/msgs/topic_info.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.

I found that the required google protoc version is changed from 2.4.0~2.4.1 to 2.3.

Below is /usr/local/include/gazebo-1.4/gazebo/msgs/server_control.pb.h .

#if GOOGLE_PROTOBUF_VERSION < 2003000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please update
#error your headers.
#endif
#if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please
#error regenerate this file with a newer version of protoc.
#endif

Do I need to downgrade google protoc?