Gazebo | Ignition | Community
Ask Your Question

Naman91's profile - activity

2016-02-08 07:21:00 -0600 received badge  Famous Question (source)
2015-06-25 11:38:26 -0600 received badge  Notable Question (source)
2015-06-25 10:13:38 -0600 received badge  Famous Question (source)
2015-06-21 10:16:28 -0600 received badge  Famous Question (source)
2015-06-19 02:39:38 -0600 received badge  Popular Question (source)
2015-06-19 02:39:36 -0600 received badge  Notable Question (source)
2015-04-25 22:26:05 -0600 received badge  Student (source)
2015-04-24 07:54:32 -0600 received badge  Famous Question (source)
2015-03-19 08:22:56 -0600 received badge  Popular Question (source)
2015-03-18 04:44:50 -0600 received badge  Notable Question (source)
2015-03-16 17:33:23 -0600 received badge  Supporter (source)
2015-03-16 17:32:48 -0600 received badge  Scholar (source)
2015-03-16 15:50:30 -0600 received badge  Popular Question (source)
2015-03-15 16:42:19 -0600 asked a question mobile robot behaving strangely while rotating and reversing Gazebo

Hi all,

I wrote a basic URDF model for a robot with two wheels at the back and one caster wheel at the front. Then, I am using "turtlesim teleop" to control the robot using the keyboard. But the robot is not behaving as expected while turning and going in reverse, please see the video attached. While turning, the motion is not smooth whereas while reversing, it is behaving really strange. I have tried changing the values of different parameters (including friction, etc.) but with no success. In the video, the robot first goes straight, then turns right, then turns left, then goes straight and then reverse. The link to the video: https://www.youtube.com/watch?v=JOSOXImbLBo&feature=youtu.be

The relevant code:

drsim.xacro

<?xml version="1.0"?>

<robot name="drsim" xmlns:xacro="http://www.ros.org/wiki/xacro">


<xacro:property name="PI" value="3.1415926535897931"/>

<xacro:property name="chassisHeight" value="0.1"/>
<xacro:property name="chassisLength" value="0.4"/>
<xacro:property name="chassisWidth" value="0.2"/>
<xacro:property name="chassisMass" value="50"/>

<xacro:property name="casterRadius" value="0.05"/>
<xacro:property name="casterMass" value="5"/>

<xacro:property name="wheelWidth" value="0.05"/>
<xacro:property name="wheelRadius" value="0.1"/>
<xacro:property name="wheelPos" value="0.1"/>
<xacro:property name="wheelMass" value="5"/>

<xacro:include filename="$(find drsim_description)/urdf/drsim.gazebo" />
<xacro:include filename="$(find drsim_description)/urdf/materials.xacro" />
<xacro:include filename="$(find drsim_description)/urdf/macros.xacro" />

<link name='base_link'>
    <collision>
        <origin xyz="0 0 ${2*casterRadius + chassisHeight/2}" rpy="0 0 0" />
        <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}" />
        </geometry>
    </collision>
    <visual>
        <origin xyz="0 0 ${2*casterRadius + chassisHeight/2}" rpy="0 0 0" />
        <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}" />
        </geometry>
        <material name="orange" />
    </visual>
</link>

<joint name="base_caster_joint" type="fixed">
    <parent link="base_link" />
    <child link="caster_wheel" />
</joint>

<link name="caster_wheel">
    <collision>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <geometry>
            <sphere radius="${casterRadius}" />
        </geometry>
    </collision>
    <visual>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <geometry>
            <sphere radius="${casterRadius}" />
        </geometry>
        <material name="red" />
    </visual>
    <inertial>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <mass value="${casterMass}"/>
        <sphere_inertia m="${casterMass}" r="${casterRadius}"/>
    </inertial>
</link>

<wheel lr="left" tY="1"/>
<wheel lr="right" tY="-1"/>

</robot>

macros.xacro

<?xml version="1.0"?>
<robot name="drsim" xmlns:xacro="http://www.ros.org/wiki/xacro">

<macro name="box_inertia" params="m x y z">
<inertia  ixx="${m*(y*y+z*z)/12}" ixy = "0" ixz = "0"
  iyy="${m*(x*x+z*z)/12}" iyz = "0"
  izz="${m*(x*x+z*z)/12}"
/>
</macro>

<macro name="sphere_inertia" params="m r">
<inertia  ixx="${2*m*r*r/5}" ixy = "0" ixz = "0"
  iyy="${2*m*r*r/5}" iyz = "0"
  izz="${2*m*r*r/5}"
/>
</macro>

<macro name="cylinder_inertia" params="m r h">
<inertia  ixx="${m*(3*r*r+h*h)/12}" ixy = "0" ixz = "0"
  iyy="${m*(3*r*r+h*h)/12}" iyz = "0"
  izz="${m*r*r/2}"
/>
</macro>


<macro name ...
(more)
2015-03-13 13:54:21 -0600 asked a question mobile robot not rotating in simulation gazebo

Hi all,

I have set up a simulation in Gazebo with a simple mobile base with two differential wheels at the back and a castor at the front. I have a differential drive controller plugin to control the robot using turtlesim turtleteleopkey. The robot is able to move forward in Gazebo using turtle teleop but it does not rotate when the left or right arrow key is pressed. I think it has to do something with the parameters I have specified but I am not able to figure it out. The relevant code:

drsim.gazebo

<gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/drsim</robotNamespace>
    </plugin>
</gazebo>

<gazebo>
    <plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>50</updateRate>
        <leftJoint>left_wheel_hinge</leftJoint>
        <rightJoint>right_wheel_hinge</rightJoint>
        <wheelSeparation>${chassisWidth+wheelWidth}</wheelSeparation>
        <wheelDiameter>${2*wheelRadius}</wheelDiameter>
        <torque>20</torque>
        <commandTopic>/cmd_vel</commandTopic>
        <odometryTopic>/odom</odometryTopic>
        <odometryFrame>odom</odometryFrame>
        <robotBaseFrame>base_link</robotBaseFrame>
    </plugin>
</gazebo>

<gazebo reference="caster_wheel">
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
    <material>Gazebo/Red</material>
</gazebo>

macros.xacro

<macro>

<gazebo reference="${lr}_wheel">
  <mu1 value="1.0"/>
  <mu2 value="1.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="0 1 0"/>
</gazebo>

<joint name="${lr}_wheel_hinge" type="continuous"> <parent link="base_link"/> <child link="${lr}_wheel"/> <origin xyz="${wheelPos - chassisLength/2} ${tY*wheelWidth/2+tY*chassisWidth/2} ${wheelRadius}" rpy="0 0 0"/> <axis xyz="0 1 0" rpy="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint>

<transmission name="${lr}_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="${lr}_wheel_hinge"> <hardwareinterface>EffortJointInterface</hardwareinterface> </joint> <actuator name="${lr}Motor"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>10</mechanicalreduction> </actuator> </transmission>

</macro>

Anyone has insights regarding this?

Any help will be appreciated.
Thanks.
Naman

2015-03-12 15:08:48 -0600 answered a question Inaccurate Laser scan from the Hokuyo sensor Gazebo

Hi,

So, I used another plugin called "libgazeboroslaser.so" and everything seems to be working now with perfect laser scan and correct interaction between Gazebo and ROS. Can anyone throw some light on the differences between the two plugins: "libgazeboroslaser.so" and "libgazeborosgpu_laser.so" ? Thanks.
Naman

2015-03-12 08:58:08 -0600 received badge  Organizer (source)
2015-03-11 18:53:54 -0600 asked a question Simple mobile base simulation not working in Gazebo

Hi all,

I am working on setting up a simulation environment in Gazebo. I have a basic mobile base robot with two wheels at the back and a caster wheel at the front.
image description

Then, when I give velocities to the two wheels using turtlesim turtleteleopkey (assume forward velocities), two wheels rotate in the correct direction but the robot does not move accordingly (remains stationary) and after some time, the robot starts rotating very slowly although both the wheels are still rotating in the forward direction. I think it might have to do something with physical properties but I am not able to figure it out.

Hope I have made myself clear. The relevant code is shown.

drsim.xacro

        <link name='base_link'>
    <collision>
        <origin xyz="0 0 ${2*casterRadius + chassisHeight/2}" rpy="0 0 0" />
        <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}" />
        </geometry>
    </collision>
    <visual>
        <origin xyz="0 0 ${2*casterRadius + chassisHeight/2}" rpy="0 0 0" />
        <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}" />
        </geometry>
        <material name="orange" />
    </visual>
</link>

<joint name="base_caster_joint" type="fixed">
    <parent link="base_link" />
    <child link="caster_wheel" />
</joint>

<link name="caster_wheel">
    <collision>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <geometry>
            <sphere radius="${casterRadius}" />
        </geometry>
    </collision>
    <visual>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <geometry>
            <sphere radius="${casterRadius}" />
        </geometry>
        <material name="red" />
    </visual>
    <inertial>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <mass value="${casterMass}"/>
        <sphere_inertia m="${casterMass}" r="${casterRadius}"/>
    </inertial>
</link>

<wheel lr="left" tY="1"/>
<wheel lr="right" tY="-1"/>

macros.xacro

<macro name="wheel" params="lr tY">

 <link name="${lr}_wheel">
 <collision>
   <origin xyz="0 0 0" rpy="0 ${PI/2} ${PI/2}" />
   <geometry>
     <cylinder length="${wheelWidth}" radius="${wheelRadius}"/>
   </geometry>
 </collision>

<visual>
  <origin xyz="0 0 0" rpy="0 ${PI/2} ${PI/2}" />
  <geometry>
    <cylinder length="${wheelWidth}" radius="${wheelRadius}"/>
  </geometry>
  <material name="black"/>
</visual>

<inertial>
  <origin xyz="0 0 0" rpy="0 ${PI/2} ${PI/2}" />
  <mass value="${wheelMass}"/>
  <cylinder_inertia m="${wheelMass}" r="${wheelRadius}" h="${wheelWidth}"/>
</inertial>

</link>

<macro name="sphere_inertia" params="m r"> <inertia ixx="${2*m*r*r/5}" ixy="0" ixz="0" iyy="${2*m*r*r/5}" iyz="0" izz="${2*m*r*r/5}"/></macro>

<macro name="cylinder_inertia" params="m r h">
<inertia  ixx="${m*(3*r*r+h*h)/12}" ixy = "0" ixz = "0"
  iyy="${m*(3*r*r+h*h)/12}" iyz = "0"
  izz="${m*r*r/2}"
/>   </macro>

<joint name="${lr}_wheel_hinge" type="continuous">
<parent link="base_link"/>
<child link="${lr}_wheel"/>
<origin xyz="${wheelPos - chassisLength/2} ${tY*wheelWidth/2+tY*chassisWidth/2} ${wheelRadius}" rpy="0 0 0" />
<axis xyz="0 1 0" rpy="0 0 0" />
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>   </joint>


<transmission name="${lr}_trans">
 <type>transmission_interface/SimpleTransmission</type>
<joint name="${lr}_wheel_hinge">
  <hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${lr}Motor">
  <hardwareInterface>EffortJointInterface</hardwareInterface>
  <mechanicalReduction>10</mechanicalReduction>
</actuator>   </transmission>

<gazebo reference="${lr}_wheel"> <mu1 value="1.0"/> <mu2 value="1.0"/> <kp value="10000000.0"/> <kd value="1 ... (more)

2015-03-11 18:41:09 -0600 asked a question Robot not moving in Gazebo simulatio

Hi all,

I am working on setting up a simulation environment in Gazebo. I have a basic mobile base robot with two wheels at the back and a castor at the front.
image description

Then, when I give velocities to the two wheels using turtlesim turtleteleopkey (assume forward velocities), two wheels rotate in the correct direction but the robot does not move accordingly and after some time, the robot starts rotating very slowly although both the wheels are still rotating in the forward direction.

Hope I have made myself clear. The relevant code is shown.

drsim.xacro

        <link name='base_link'>
    <collision>
        <origin xyz="0 0 ${2*casterRadius + chassisHeight/2}" rpy="0 0 0" />
        <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}" />
        </geometry>
    </collision>
    <visual>
        <origin xyz="0 0 ${2*casterRadius + chassisHeight/2}" rpy="0 0 0" />
        <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}" />
        </geometry>
        <material name="orange" />
    </visual>
</link>

<joint name="base_caster_joint" type="fixed">
    <parent link="base_link" />
    <child link="caster_wheel" />
</joint>

<link name="caster_wheel">
    <collision>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <geometry>
            <sphere radius="${casterRadius}" />
        </geometry>
    </collision>
    <visual>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <geometry>
            <sphere radius="${casterRadius}" />
        </geometry>
        <material name="red" />
    </visual>
    <inertial>
        <origin xyz="${chassisLength/2 - casterRadius} 0 ${casterRadius}" rpy="0 0 0"/>
        <mass value="${casterMass}"/>
        <sphere_inertia m="${casterMass}" r="${casterRadius}"/>
    </inertial>
</link>

<wheel lr="left" tY="1"/>
<wheel lr="right" tY="-1"/>

macros.xacro

<robot name="drsim" xmlns:xacro="&lt;a href=" http:="" www.ros.org="" wiki="" xacro"="">http://www.ros.org/wiki/xacro">

<macro name="sphere_inertia" params="m r"> <inertia ixx="${2*m*r*r/5}" ixy="0" ixz="0" iyy="${2*m*r*r/5}" iyz="0" izz="${2*m*r*r/5}"/> </macro>

<macro name="cylinder_inertia" params="m r h"> <inertia ixx="${m*(3*r*r+h*h)/12}" ixy="0" ixz="0" iyy="${m*(3*r*r+h*h)/12}" iyz="0" izz="${m*r*r/2}"/> </macro>

<joint name="${lr}_wheel_hinge" type="continuous"> <parent link="base_link"/> <child link="${lr}_wheel"/> <origin xyz="${wheelPos - chassisLength/2} ${tY*wheelWidth/2+tY*chassisWidth/2} ${wheelRadius}" rpy="0 0 0"/> <axis xyz="0 1 0" rpy="0 0 0"/> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint>

<transmission name="${lr}_trans"> <type>transmission_interface/SimpleTransmission</type> <joint name="${lr}_wheel_hinge"> <hardwareinterface>EffortJointInterface</hardwareinterface> </joint> <actuator name="${lr}Motor"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>10</mechanicalreduction> </actuator> </transmission>

Does anyone has some experience about such an issue? Any help will be appreciated.

Thanks. Naman

2015-03-11 12:26:22 -0600 received badge  Notable Question (source)
2015-03-11 10:42:31 -0600 commented answer Inaccurate Laser scan from the Hokuyo sensor Gazebo

Hi, Thanks for the reply.I have updated the original question by adding the image after enabling collisions.

2015-03-11 10:05:10 -0600 asked a question Inaccurate Laser scan from the Hokuyo sensor Gazebo

Hi all,

I have been working on setting up the simulation environment in Gazebo and I have a simple mobile base with the hokuyo sensor on top of it. The laser scan coming out of it seems inaccurate.image description
I know I am doing some thing silly but I am not able to figure it out. I have attached the necessary code for the Hokuyo sensor. Please let me know if you need anything else from my side.

drsim.xacro

<link name="base_laser_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
</collision>

    <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <mesh filename="package://drsim_control/meshes/hokuyo.dae"/>
        </geometry>
    </visual>

    <inertial>
        <mass value="1e-5" />
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
    </inertial>
</link>

drsim.gazebo

    <gazebo reference="base_laser_link">
    <sensor type="gpu_ray" name="head_hokuyo_sensor">
        <pose>0 0 0 0 0 0</pose>
        <visualize>true</visualize>
        <update_rate>40</update_rate>
        <ray>
            <scan>
                <horizontal>
                    <samples>720</samples>
                    <resolution>1</resolution>
                    <min_angle>-1.570796</min_angle>
                    <max_angle>1.570796</max_angle>
                </horizontal>
                <vertical>
                    <samples>1</samples>
                    <resolution>1</resolution>
                    <min_angle>0</min_angle>
                    <max_angle>0</max_angle>
                </vertical>
            </scan>
            <range>
                <min>0.10</min>
                <max>30.0</max>
                <resolution>0.01</resolution>
            </range>
            <noise>
            <type>gaussian</type>
                <mean>0.0</mean>
                <stddev>0.01</stddev>
            </noise>
      </ray>

      <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
        <topicName>/base_scan</topicName>
        <frameName>base_laser_link</frameName>
      </plugin>

    </sensor>
</gazebo>

Any help will be appreciated.
Thanks!
Naman

2015-03-11 10:02:21 -0600 received badge  Editor (source)
2015-03-11 10:01:31 -0600 asked a question Inaccurate Laser scan from the Hokuyo sensor Gazebo

Hi all,

I have been working on setting up the simulation environment in Gazebo and I have a simple mobile base with the hokuyo sensor on top of it. The laser scan coming out of it seems inaccurate.image description
I know I am doing some thing silly but I am not able to figure it out. I have attached the necessary code for the Hokuyo sensor. Please let me know if you need anything else from my side.

drsim.xacro

<!-- Hokuyo Laser -->
    <link name="base_laser_link">
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size="0.1 0.1 0.1"/>
            </geometry>
        </collision>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://drsim_control/meshes/hokuyo.dae"/>
            </geometry>
        </visual>

        <inertial>
            <mass value="1e-5" />
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
        </inertial>
    </link>

drsim.gazebo

 <!-- hokuyo -->
    <gazebo reference="base_laser_link">
        <sensor type="gpu_ray" name="head_hokuyo_sensor">
            <pose>0 0 0 0 0 0</pose>
            <visualize>true</visualize>
            <update_rate>40</update_rate>
            <ray>
                <scan>
                    <horizontal>
                        <samples>720</samples>
                        <resolution>1</resolution>
                        <min_angle>-1.570796</min_angle>
                        <max_angle>1.570796</max_angle>
                    </horizontal>
                    <vertical>
                        <samples>1</samples>
                        <resolution>1</resolution>
                        <min_angle>0</min_angle>
                        <max_angle>0</max_angle>
                    </vertical>
                </scan>
                <range>
                    <min>0.10</min>
                    <max>30.0</max>
                    <resolution>0.01</resolution>
                </range>
                <noise>
                <type>gaussian</type>
                    <mean>0.0</mean>
                    <stddev>0.01</stddev>
                </noise>
          </ray>

          <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
            <topicName>/base_scan</topicName>
            <frameName>base_laser_link</frameName>
          </plugin>

        </sensor>
    </gazebo>

Update: I have attached the image after View->Collisions image description

Update 2: It turns out that even if I have only the sensor (no mobile robot), I get the same inaccurate laser scan. So, I think the type of sensor is wrong because when I change the type of sensor to "ray" from "gpuray" and plugin to libRayPlugin.so from libgazeborosgpulaser.so, I get the accurate laser scan as shown:

image description

But I cant use the new plugin if I want to interface gazebo with ros and get the laser scan data on a ros topic (For example /base_scan). Does anyone have any insights into this?

Any help will be appreciated.
Thanks!
Naman

2015-03-09 10:32:34 -0600 commented answer Installing Gazebo 5.0 along with with Gazebo 2.2 and ROS Indigo (Ubuntu 14.04)

Thanks for the reply. I tried it couple of days back. While installing it tells that it will remove some packages including ros-indigo-desktop-full which I obviously dont want. Is it because of some compatibility issues between Gazebo 5.0 and ROS Indigo? Is there any way around it?

2015-03-09 10:29:10 -0600 received badge  Popular Question (source)
2015-03-06 14:08:46 -0600 asked a question Installing Gazebo 5.0 along with with Gazebo 2.2 and ROS Indigo (Ubuntu 14.04)

Hi all,

I have ROS Indigo installed with Gazebo 2.2 which comes by default with it. I also want to install Gazebo 5.0 as I want to use its Import feature to import a building floor plan (Building editor) which comes in Gazebo 5.0, I dont have to use Gazebo 5.0 with ROS indigo. When I try the answer here: http://answers.gazebosim.org/question/7999/gazebo5-ros-packages/ it tells me that it will remove ROS Indigo from the machine which I dont want obviously. Is there any way of installing Gazebo 5.0 along with ROS Indigo and Gazebo 2.2?

Thanks in advance. Naman