Gazebo | Ignition | Community
Ask Your Question

Adolfo Rodríguez T's profile - activity

2018-10-05 02:36:33 -0500 received badge  Student (source)
2017-06-06 09:21:12 -0500 received badge  Good Answer (source)
2016-12-13 17:57:12 -0500 received badge  Guru (source)
2016-12-13 17:57:12 -0500 received badge  Great Answer (source)
2015-10-31 12:31:03 -0500 marked best answer Best practice for exposing an existing URDF model as a Gazebo 1.4 model

I can successfully load an existing URDF robot model into Gazebo 1.4. What I want to achieve now is a file/folder setup that plays as nicely as possible with Gazebo and my existing robot description ROS package. My current solution is to

  1. Leave existing robot description ROS package as-is, ie. Gazebo-agnostic (actual package).
  2. Create a model database in a simulation-specific folder added to the GAZEBO_MODEL_PATH.

The model database in 2. needs of course access to an up-to-date URDF model, and its mesh/image resources which do not live here, but in 1. I'm currently using cmake custom commands/targets to run xacro and expose resources through a symlink (code snippet at the end of the post). This works well.

My question is whether someone has come up with a simpler/more elegant solution to this problem.

Just for the record, I'm not adding the Gazebo model database directly in the existing robot description ROS package not only to prevent unwanted dependency couplings, but also because this ROS package does not fully comply with the Gazebo database folder structure, so Gazebo rightfully complains of unexpected contents when loading it.


CMake code snippet:


# Generate an up-to-date URDF robot description using xacro
set(INPUT_XACRO_FILE ${reem_description_PACKAGE_PATH}/robots/reem.urdf.xacro)
set(OUTPUT_URDF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/models/reem_description/model.urdf)

add_custom_command(OUTPUT ${OUTPUT_URDF_FILE}
                   COMMAND ${xacro_PACKAGE_PATH}/ ${INPUT_XACRO_FILE} -o ${OUTPUT_URDF_FILE})

add_custom_target(generate_urdf ALL DEPENDS ${OUTPUT_URDF_FILE})

# Create symlink to robot model resources (meshes, images)
set(INPUT_MESHES_DIR ${reem_description_PACKAGE_PATH}/meshes)
set(OUTPUT_MESHES_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/models/reem_description/meshes)

add_custom_command(OUTPUT ${OUTPUT_MESHES_SYMLINK}
                   COMMAND ${CMAKE_COMMAND} -E create_symlink ${INPUT_MESHES_DIR} ${OUTPUT_MESHES_SYMLINK})

add_custom_target(generate_meshes_link ALL DEPENDS ${OUTPUT_MESHES_SYMLINK})
2015-05-27 08:58:47 -0500 answered a question ros_control - update

control_toolbox 1.13.1 had a regression, which is not present in 1.13.0, and has been fixed in 1.13.2. For more details, please refer to this post, which circulated on ros-users and the robot control SIG.

2015-04-27 02:47:37 -0500 commented answer How to install ros-indigo-gazebo-ros-control with Gazebo 5

The official Gazebo version for Indigo is 2.x (source). If you want to give Gazebo 5 a try, expect some migration effort (building from source, patching) of gazebo_ros_control, if the parts of the Gazebo API it uses have changed.

2015-04-07 05:03:42 -0500 received badge  Guru (source)
2015-04-07 05:03:42 -0500 received badge  Great Answer (source)
2014-12-09 22:48:58 -0500 received badge  Nice Answer (source)
2014-06-10 03:26:11 -0500 answered a question gazebo-ros-pkgs for ros-Indigo

You can follow progress in this issue.

2014-05-28 09:31:42 -0500 commented question gazebo_ros_control segfaults on load

I'll try to give the tutorials a go and see if I can reproduce.

2014-05-28 03:01:18 -0500 commented question gazebo_ros_control segfaults on load

Could you please post the installed versions of the gazebo and ros-hydro-gazebo-ros-control packages?. Also, it would help if you could get a gdb backtrace of the crash.

2014-05-17 16:44:50 -0500 received badge  Good Answer (source)
2014-03-26 12:13:51 -0500 received badge  Nice Answer (source)
2014-01-31 01:43:58 -0500 received badge  Nice Answer (source)
2014-01-30 05:03:09 -0500 answered a question Is there a Gazebo plugin that simulates sonar and infrared sensors?

We are using the GazeboRosRange class available in the pal_gazebo_plugins repo. If you find it useful, we could maybe consider moving it upstream.

2013-09-19 04:04:16 -0500 commented answer The inertia matrix explained

Martin already updated it. The link is in the original question.

2013-09-18 14:08:00 -0500 received badge  Enlightened (source)
2013-09-18 07:48:04 -0500 received badge  Good Answer (source)
2013-09-18 04:40:27 -0500 received badge  Nice Answer (source)
2013-09-18 04:25:51 -0500 received badge  Commentator
2013-09-18 04:25:51 -0500 commented answer The inertia matrix explained

Very well written. I hope this clarifies the confusion in the tutorial.

2013-09-18 02:50:21 -0500 answered a question The inertia matrix explained

The inertia tensor encodes the mass distribution of a body, so it does depend on the mass, but also on where it is located.

The URDF tutorial you point to states that

"If unsure what to put, the identity matrix is a good default."

I highly disagree with this statement, as there is no one-size-fits-all inertia. In fact, this value will probably be too large for most links used in human-sized robots (or smaller). In my experience, heavier mobile base links (in the 50kg-100kg range) have inertias that fall within this order of magnitude, but almost all other smaller links (belonging to arms, legs, heads) have inertias that are between two and five orders of magnitude smaller.

That being said, this statement is only saying that for a given mass, you're assuming a fictitious mass distribution the yields the identity. Although it may seem unrealistic, it is possible to distribute mass so that a desired matrix results.

2013-09-04 03:56:24 -0500 commented answer xacro dependency problem while installing gazebo_ros_pkgs on ROS Groovy

I just made the cmake_modules dependency explicit, which is wasn't. Concerning the rosdep failures, could you post the output of rosdep --version?. The current version (0.10.21) successfully resolves all dependencies. Older versions (at least 0.10.14) fail with errors like the ones you mention. You can check if the rosdep database contains a given package by running rosdep db | grep package_name.

2013-09-04 02:54:06 -0500 commented answer xacro dependency problem while installing gazebo_ros_pkgs on ROS Groovy

gazeboroscontrol is slated for release in hydro, so @hsu's suggestion is a good one. If you are still interested in giving the hydro stuff, use a recent version of rosdep to resolve missing dependencies.

2013-08-22 11:21:04 -0500 received badge  Teacher (source)
2013-08-22 02:11:41 -0500 commented answer joint_state ROS topic from Gazebo and ros_control

Before ros_control it was mostly a do-it-yourself thing. To save time, many people ended up adapting the pr2_controller_manager to their simulated robot, but that often resulted in different interfaces for the simulated and real robot scenarios. The ros_control project is in fact an evolution of the pr2_controller_manager aimed at being robot-agnostic.

Leveraging ros_control should be much less work than you doing a rewrite from scratch of a Gazebo plugin.

2013-08-21 02:52:13 -0500 answered a question joint_state ROS topic from Gazebo and ros_control

Question 1

When using ros_control, the /joint_states topic is published by an instance of the JointStateController. This is a read-only controller that does not command any joint, but rather publishes the current joint states at a configurable frequency.

To run this controller you need to load its configuration to the ROS parameter server and load/start it in the controller manager. This launch file in the controller's repository does just that.

Once you have a valid joint_states topic, tf should start publishing frame data, and tf-dependent Rviz plugins like RobotModel should also work.

Question 2

These resources are currently available:

At some point these should probably be consolidated in a single place.

If you still have unanswered questions, don't hesitate to ask. There's a ROS Control SIG you might be interested in joining for ros_control-specific discussions.

Finally, consider that ros_control is not yet officially released, and not all parts of the documentation have reached maturity. Feature requests and patches are always welcome.

2013-06-17 03:39:00 -0500 answered a question Changes to model behavior when converting between Gazebo 1.0 and Gazebo 1.8

On the one hand, joint velocity and effort limit enforcing was introduced in Gazebo 1.5 (although it does not show up in the Changelog), so you could check your robot model for small limit values; they were being ignored before. On the other hand, the limits enforcing implementation have been the subject to debate.


2013-05-14 07:58:32 -0500 received badge  Famous Question (source)
2013-05-10 11:47:06 -0500 answered a question Setting joint velocity through plugin

What does this->joints[i]->GetMaxForce(0) return?. I stumbled into this recently, and figured that the MaxForce needs to be set to a nonzero value, ie.

this->joints[i]->SetMaxForce(0, nonzero_val)

The odd thing was that I could do this->joints[i]->SetAngle(0, angle) with the MaxForce set to zero and it worked. AFAICT the joint was not static.

2013-04-04 05:09:45 -0500 received badge  Famous Question (source)
2013-03-20 11:10:57 -0500 received badge  Notable Question (source)
2013-03-18 03:59:25 -0500 marked best answer When importing a URDF model, how are package:// URIs parsed?

I'm using gzfactory to load a URDF in which mesh resources are specified using package://ros_package/relative/path URIs. Testing seems to indicate that Gazebo removes the package:// identifier and treats the remaining string as a relative filesystem path. Is this what's really going on under the hood?.


2013-03-18 03:59:24 -0500 received badge  Supporter (source)
2013-03-15 20:58:24 -0500 received badge  Popular Question (source)
2013-03-15 03:29:13 -0500 commented answer Error with ROS Simulator-Gazebo and best practices for URDFs in Gazebo

FYI you can still spawn URDFs from Gazebo standalone. There is a slight overhead to port your existing models to the standalone structure, but you don't have to sacrifice URDF, at least for now. The main difference is that your models: 1. must be exposed as a Gazebo model database, and 2. should be spawned using gzfactory instead of spawn_model.

2013-03-14 09:41:22 -0500 received badge  Notable Question (source)
2013-03-13 03:21:16 -0500 answered a question Is it possible to simulate a 'belt' between two joints?

You should be able to do this by appropriately defining mechanical transmissions. A prerequisite for this is that your control backend (eg. pr2_controller_manager, ros_control's generic controller_manager -- work in progress) should be able to represent the notion of a transmission.

You would need to implement a custom transmission and define the actuator <-> joint space mappings for the variables of interest, usually effort, velocity and position. Your transmission model can then be as detailed as you need it to, eg. consider or neglect belt elasticity, dead bands, etc.

2013-03-12 07:14:35 -0500 commented question symbol lookup error with latest gazebo(1.5.0-1~precise)/drcsim(2.1.0-1~precise) from .debs

A minimal test to reproduce is to run gazebo -s

2013-03-12 06:25:54 -0500 commented answer Weird texture mapping in Collada meshes (1.3.0)

I can confirm that color maps are properly loaded in Gazebo 1.5. In 1.4 the specularity map was being shown instead. Thanks devs.