Gazebo | Ignition | Community
Ask Your Question

teshansj's profile - activity

2021-08-12 04:09:00 -0600 received badge  Famous Question (source)
2020-08-25 00:19:40 -0600 received badge  Famous Question (source)
2020-08-25 00:19:40 -0600 received badge  Notable Question (source)
2020-07-21 01:47:39 -0600 received badge  Popular Question (source)
2020-07-20 02:12:50 -0600 received badge  Notable Question (source)
2020-07-18 22:26:20 -0600 answered a question How to include uri relatively?

You can make gazebo look in the package directory for models using the package.xml. In the below example, you can put yo

2020-07-16 22:34:43 -0600 commented answer Two lasers on one robot not working properly

Yes the localization cannot handle multiple sources. I am going to write a separate node for merging scans. Thanks

2020-07-16 15:29:36 -0600 received badge  Popular Question (source)
2020-07-16 07:19:37 -0600 commented answer Two lasers on one robot not working properly

Yes the sensor names was the problem. Thank you. With both sensors publishing to /scan, the update rate is 4 now which

2020-07-16 07:11:01 -0600 commented answer Two lasers on one robot not working properly

Yes the sensor names was the problem. Thank you. With both sensors publishing to /scan, the update rate is 4 now which

2020-07-16 07:06:53 -0600 marked best answer Two lasers on one robot not working properly

I have two lasers (ray sensors) on my robot (modeled in URDF), on front and back. However, when I use both of them, I can see a few problems

  1. they do not publish at the intended frequency. Published frequency seems to be around 10Hz at the beginning and slows down little by little to around 8Hz.
  2. Each laser shows a glitch few times a second where the laser seems to be shifted
  3. When I set the laser to be visualized, gazebo only shows one laser

When I only use one laser, it works fine and publishes at the rate specified in <update_rate> tag.


Here's some images from the robot with ROS move-base with both lasers in use. Green dots in line shows the laser. Black box is the robot

  1. Both lasers on. Only the rear one seems to be working Both lasers on. Only one seems to be working

  2. How gazebo shows only one laser. The other laser is positioned on top left corner of the robot How gazebo shows only one laser

  3. The glitch. The one laser that was working is still showing as well. The shifted laser seems to be the combined laser showing the full 360 view but it is rotated 180 image description


This is the gazebo elements for the lasers. What am I missing here?

<gazebo reference="front_scan">
  <material>Gazebo/FlatBlack</material>
  <sensor name="lds_lfcd_sensor" type="ray">
    <pose>0 0 0 0 0 0</pose>
    <visualize>false</visualize>
    <update_rate>2</update_rate>
    <ray>
      <scan>
        <horizontal>
          <samples>360</samples>
          <resolution>1</resolution>
          <min_angle>-2.25619449019</min_angle>
          <max_angle>2.25619449019</max_angle>
        </horizontal>
      </scan>
      <range>
        <min>0.12</min>
        <max>15.0</max>
        <resolution>0.015</resolution>
      </range>
      <noise>
        <type>gaussian</type>
        <mean>0.0</mean>
        <stddev>0.01</stddev>
      </noise>
    </ray>
    <plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_lds_lfcd_controller">
      <topicName>scan</topicName>
      <frameName>front_scan</frameName>
    </plugin>
  </sensor>
</gazebo>
<gazebo reference="rear_scan">
  <material>Gazebo/FlatBlack</material>
  <sensor name="lds_lfcd_sensor" type="ray">
    <pose>0 0 0 0 0 0</pose>
    <visualize>false</visualize>
    <update_rate>2</update_rate>
    <ray>
      <scan>
        <horizontal>
          <samples>360</samples>
          <resolution>1</resolution>
          <min_angle>-2.25619449019</min_angle>
          <max_angle>2.25619449019</max_angle>
        </horizontal>
      </scan>
      <range>
        <min>0.12</min>
        <max>15.0</max>
        <resolution>0.015</resolution>
      </range>
      <noise>
        <type>gaussian</type>
        <mean>0.0</mean>
        <stddev>0.01</stddev>
      </noise>
    </ray>
    <plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_lds_lfcd_controller">
      <topicName>scan</topicName>
      <frameName>rear_scan</frameName>
    </plugin>
  </sensor>
</gazebo>
2020-07-15 11:37:01 -0600 edited question Two lasers on one robot not working properly

Two lasers on one robot not working properly I have two lasers (ray sensors) on my robot (modeled in URDF), on front and

2020-07-15 11:32:57 -0600 edited question Two lasers on one robot not working properly

Two lasers on one robot not working properly I have two lasers (ray sensors) on my robot (modeled in URDF), on front and

2020-07-15 11:30:04 -0600 asked a question Two lasers on one robot not working properly

Two lasers on one robot not working properly I have two lasers (ray sensors) on my robot (modeled in URDF), on front and

2020-07-15 11:03:39 -0600 marked best answer Using SDF instead of URDF with ROS Robot State Publisher

With URDF models, you can use robot_state_publisher to have the joints published in tf. Since this needs the <robot> tag, it does not work with SDF models. If you try to roslaunch for a SDF it would say

Could not find the 'robot' element in the xml file

Everything else works fine in gazebo but the state publisher dies

Is there any way I can use robot state publisher with SDF? Maybe include URDF into the SDF? Or specify the <robot> tag in it somehow?


TL;DR:

I have found many other questions related to this question but none had a positive answer and most of them are more than 5 years old. However,

  • This answer suggests that you can do anything with SDF that is possible in URDF.
  • This question has an answer suggesting an alternative by having both URDF and SDF but it's an ugly solution
  • There's this old unanswered question as well

I want to create a 6 wheeled robot model with two wheels having shock absorbers (prismatic joints with damping and spring actions). To my understanding, this cannot be done using URDF

2020-07-15 11:03:32 -0600 answered a question Using SDF instead of URDF with ROS Robot State Publisher

My problem was URDF not being able to do some stuff SDF can. But I wasn't aware of the <gazebo> tags at the time.

2020-07-14 00:37:06 -0600 received badge  Enthusiast
2020-07-13 09:22:52 -0600 received badge  Famous Question (source)
2020-07-13 09:21:27 -0600 received badge  Editor (source)
2020-07-13 09:21:27 -0600 edited question Modelling a damper with URDF

Modelling a damper with URDF I need to model shock absorber like behavior for a robot's wheels. How do I do this with UR

2020-07-13 09:20:02 -0600 asked a question Modelling a damper with URDF

Modelling a damper with URDF I need to model shock absorber like behavior for a robot's wheels. How do I do this with UR

2020-07-13 07:31:12 -0600 asked a question Using SDF instead of URDF with ROS Robot State Publisher

Using SDF instead of URDF with ROS Robot State Publisher With URDF models, you can use robot_state_publisher to have the

2020-06-16 08:27:19 -0600 received badge  Supporter (source)
2020-06-15 01:38:10 -0600 commented answer What is a simple way to run Gazebo with no graphics?

It still is the first to appear; after 8 years :-D

2020-06-13 14:31:46 -0600 received badge  Notable Question (source)
2020-06-13 11:40:08 -0600 marked best answer Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18

I am trying to control a turtlebot3 in gazebo using ROS. I can do this without a problem in Ubuntu 16 ros kinetic (gazebo 7). But I cannot do the same thing with same commands in Ubuntu 18 ros melodic (gazebo 9)

Here's the log shown from roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch in ros melodic

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://xxxxxx:45893/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.5
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [3042]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 331250c0-acb1-11ea-af42-0c5b8f279a64
process[rosout-1]: started with pid [3053]
started core service [/rosout]
process[gazebo-2]: started with pid [3056]
process[gazebo_gui-3]: started with pid [3064]
process[spawn_urdf-4]: started with pid [3070]
[ INFO] [1591968766.435037191]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968766.435766509]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968766.484922295]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968766.485743143]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968766.762218392, 0.003000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591968767.093444620, 0.168000000]: Physics dynamic reconfigure ready.
[spawn_urdf-4] process has finished cleanly
log file: /home/XXXXX/.ros/log/331250c0-acb1-11ea-af42-0c5b8f279a64/spawn_urdf-4*.log

ROS topic list after launching this is as follows

/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg

Here's the log from the same roslaunch in ros kinetic in which this works fine

started roslaunch server http://xxxxxx-l-l:41851/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [8166]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a1193f98-acb1-11ea-8274-8c04ba099a14
process[rosout-1]: started with pid [8179]
started core service [/rosout]
process[gazebo-2]: started with pid [8187]
process[gazebo_gui-3]: started with pid [8207]
process[spawn_urdf-4]: started with pid [8213]
[ INFO] [1591968950.965463454]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968950.965900805]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968950.978686441]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968950.979178680]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968951.385803403, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591968951.738905171, 0.163000000]: Laser Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1591968951.738957452, 0.163000000]: Starting Laser Plugin (ns = /)
[ INFO] [1591968951.740414014, 0.163000000]: Physics dynamic reconfigure ready.
[ INFO] [1591968951.740771321, 0.163000000]: Laser Plugin (ns = /)  <tf_prefix_>, set to ""
[ INFO] [1591968951.833262130, 0.163000000]: Starting plugin DiffDrive(ns = //)
[ INFO] [1591968951.833336896, 0.163000000]: DiffDrive(ns = //): <rosDebugLevel> = na
[ INFO] [1591968951.834254336, 0.163000000]: DiffDrive(ns = //): <tf_prefix> = 
[ INFO] [1591968951.836164861, 0.163000000]: DiffDrive(ns = //): Advertise joint_states
[ INFO] [1591968951.836952897, 0.163000000]: DiffDrive(ns = //): Try to subscribe to cmd_vel
[ INFO] [1591968951.840035635, 0.163000000]: DiffDrive(ns = //): Subscribe to cmd_vel
[ INFO] [1591968951.840746578, 0.163000000]: DiffDrive(ns = //): Advertise odom on odom ...
(more)
2020-06-13 11:40:08 -0600 received badge  Scholar (source)
2020-06-13 04:22:52 -0600 commented question Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18

That was the problem. Thank you. Please add it as an answer

2020-06-13 04:19:46 -0600 commented question Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18

That was the problem. Thank you

2020-06-12 18:43:23 -0600 received badge  Popular Question (source)
2020-06-12 13:31:42 -0600 asked a question Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18

Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18 I am trying to control a turtlebot3 in gazebo using ROS. I can do