Gazebo | Ignition | Community
Ask Your Question

der.sonic's profile - activity

2017-06-24 01:43:10 -0500 received badge  Famous Question (source)
2017-06-24 01:43:10 -0500 received badge  Notable Question (source)
2017-06-24 01:43:10 -0500 received badge  Popular Question (source)
2017-04-01 08:37:16 -0500 received badge  Famous Question (source)
2017-03-27 05:57:15 -0500 asked a question Can't point depth camera in forward direction

I defined custom robot with Asus Xtyion camera, but I have one problem with depth camera orientation. There are two other questions with the similar problem, but they are about Rviz part of my problem, where I also have Gazebo part of the problem :) I use libgazebo_ros_camera and libgazebo_ros_openni_kinect controllers. RGB image is displayed properly in RViz, but depth cloud has two problems. One is that gazebo for some reason points depth camera to the left side of the robot/camera, and changing pose tag is not changing anything. At first that was the problem with RGB camera too, but pose tag helped in that case. Second problem is that in Rviz point cloud is rotated around Y axis I think, so it is in front of the robot, but points down through the ground, and displays the scene from the left side of the robot. Any suggestions? Here is the part of URDF:

<gazebo reference="Camera">
<sensor type="camera" name="xtion_rgb">
  <update_rate>30.0</update_rate>
  <camera name="xtion_rgb">
    <pose>0 0 0 3.14 0 1.57</pose>
    <horizontal_fov>1.01229</horizontal_fov>
    <image>
      <width>640</width>
      <height>480</height>
      <format>R8G8B8</format>
    </image>
    <clip>
      <near>0.05</near>
      <far>50</far>
    </clip>
    <noise>
      <type>gaussian</type>
      <!-- Noise is sampled independently per pixel on each frame.
           That pixel's noise value is added to each of its color
           channels, which at that point lie in the range [0,1]. -->
      <mean>0.0</mean>
      <stddev>0.007</stddev>
    </noise>
  </camera>
  <plugin name="RGB_camera_controller" filename="libgazebo_ros_camera.so">
    <alwaysOn>true</alwaysOn>
    <updateRate>0.0</updateRate>
    <cameraName>xtion_rgb</cameraName>
    <imageTopicName>image_raw</imageTopicName>
    <cameraInfoTopicName>camera_info</cameraInfoTopicName>
    <frameName>Camera</frameName>
    <hackBaseline>0.07</hackBaseline>
    <distortionK1>0.0</distortionK1>
    <distortionK2>0.0</distortionK2>
    <distortionK3>0.0</distortionK3>
    <distortionT1>0.0</distortionT1>
    <distortionT2>0.0</distortionT2>
  </plugin>
</sensor>

<sensor type="depth" name="xtion_d">
  <update_rate>30.0</update_rate>
  <camera name="xtion_ir">
      <!--<pose>0 0 0 0 0 0</pose>-->
    <horizontal_fov>1.01229</horizontal_fov>
    <image>
      <width>640</width>
      <height>480</height>
      <format>R8G8B8</format>
    </image>
    <clip>
      <near>0.05</near>
      <far>10</far>
    </clip>
  </camera>
  <plugin name="Depth_camera_controller" filename="libgazebo_ros_openni_kinect.so">
    <baseline>0.2</baseline>
    <alwaysOn>true</alwaysOn>
    <updateRate>0.0</updateRate> <!-- Not sure why 6 -->
    <cameraName>xtion_ir</cameraName>
    <imageTopicName>depth/image_raw</imageTopicName>
    <cameraInfoTopicName>depth/camera_info</cameraInfoTopicName>
    <depthImageTopicName>depth/image_raw</depthImageTopicName>
    <depthImageInfoTopicName>depth/camera_info</depthImageInfoTopicName>
    <pointCloudTopicName>depth/points</pointCloudTopicName>
    <frameName>Camera</frameName>
    <pointCloudCutoff>0.05</pointCloudCutoff>
    <pointCloudCutoffMax>10</pointCloudCutoffMax>
    <rangeMax>10.0</rangeMax>
    <distortionK1>0.0</distortionK1>
    <distortionK2>0.0</distortionK2>
    <distortionK3>0.0</distortionK3>
    <distortionT1>0.0</distortionT1>
    <distortionT2>0.0</distortionT2>
    <CxPrime>0</CxPrime>
    <Cx>0</Cx>
    <Cy>0</Cy>
    <focalLength>0</focalLength>
    <hackBaseline>0</hackBaseline>
  </plugin>
</sensor>

</gazebo>

2017-03-21 02:20:33 -0500 received badge  Enthusiast
2017-03-17 06:54:30 -0500 answered a question depth camera is publishing wrong rotated pointcloud

Any answers to this question? I am having the same problem right now. Using libgazebo_ros_camera and libgazebo_ros_openni_kinect controllers. RGB image is displayed properly in RViz, but depth cloud has two problems. One is that gazebo for some reason points depth camera to the left side of the robot/camera, and changing pose tag is not changing anything. At first that was the problem with RGB one, but pose tag helped in that case. Second problem is that in Rviz point cloud is rotated around Y axis I think, so it is in front of the robot, but points down through the ground, and displays the scene from the left side of the robot. Any suggestions? I can provide URDF if needed....

2017-02-16 06:21:10 -0500 received badge  Notable Question (source)
2017-02-16 01:32:57 -0500 received badge  Popular Question (source)
2017-02-15 22:49:30 -0500 commented answer Robot won't move diff drive nor arm

The problem was in joint's effort and velocity variables, they were too low. I've change them for all joints to be 100 and 10, and now I can move every joint by publishing on the corresponding topics. Second problem was because joint_state_controller publishes states only for joints that have transmission and hardware interface tags. Adding that to caster wheel joints fixes the problem. Small side note, transmission tags are not necessary when you run separate joint state publisher node.

2017-02-15 10:30:51 -0500 asked a question Robot won't move diff drive nor arm

ROS Kinetic, Gazebo 7.0, Ubuntu 16.04

We have a custom designed mobile platform with 2 differential drive wheels, 4 caster wheels, and 6 DOF arm on top of that base. After running the launch file, gazebo is loaded without any errors, saying that all required plugins and controllers were loaded, all topics are published. When I send manual Twist to base or Position to arm, nothing moves. Although there is a constant slight drift in mobile base position (probably due to wrongly specified friction parameters). I'll provide snippets from various files I am using.
In robot urdf file I have things like this: Wheel joint

  <joint name="Cassis_Left_wheel" type="continuous">
    <parent link="Cassis"/>
    <child link="Left_wheel"/>
    <origin rpy="3.14159 0 1.57079" xyz="-3.84092 4.53357 0.0975"/>
    <axis xyz="1 0 0"/>
    <limit effort="1.0" lower="0.0" upper="0.0" velocity="0.0"/>
  </joint>

Arm joint

  <joint name="Cassis_M_link1" type="revolute">
    <parent link="Cassis"/>
    <child link="M_link1"/>
    <origin rpy="3.14159 0 1.57079" xyz="-3.41592 4.16774 0.93378"/>
    <axis xyz="0 0 1"/>
    <limit effort="1.0" lower="-3.14" upper="3.14" velocity="0.0"/>
  </joint>

Wheel transmission

  <transmission name="Cassis_Left_wheel_trans">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="Cassis_Left_wheel">
      <hardwareInterface>VelocityJointInterface</hardwareInterface>
    </joint>
    <actuator name="motor_left">
      <hardwareInterface>VelocityJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

Arm joint transmission

  <transmission name="Cassis_M_link1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="Cassis_M_link1">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="base_motor">
      <hardwareInterface>PositionJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

Gazebo control plugin

  <gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <!-- <robotNamespace>/telega</robotNamespace> -->
    </plugin>
  </gazebo>

My launch file is this

<launch>
    <!-- Load the Telega sdf model into parameter server -->
    <param name="robot_description" textfile="$(find telega_description)/sdf/Mobile_platform.urdf" />
    <rosparam command="load" file="$(find telega_pkg)/src/robot_parameters.yaml" />
    <!-- Turn on joint state publisher gui control -->
    <param name="use_gui" value="True" />

    <!-- Start Gazebo with an empty world -->
    <!-- Defines Rviz custom config file for telega -->
    <arg name="rvizconfig" default="$(find telega_pkg)/src/telega.rviz" />
    <include file="$(find gazebo_ros)/launch/empty_world.launch" />

    <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
          output="screen" 
          args="joint_state_controller
                arm_base_position_controller
                sholder_position_controller
                elbow_position_controller
                wrist1_position_controller
                wrist2_position_controller
                wrist3_position_controller
                mobile_base_controller"
    />

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

    <!-- Spawn a Telega in Gazebo, taking the description from the parameter server -->
    <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model"
          args="-param robot_description -urdf -model Mobile_platform" />
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
</launch>

And finally my robot_parameters.yaml file

joint_state_controller:
  type: "joint_state_controller/JointStateController"
  publish_rate: 50  

arm_base_position_controller:
  type: "position_controllers/JointPositionController"
  joint: "Cassis_M_link1" 
  pid: {p: 100.0, i: 0.01, d: 10.0}

sholder_position_controller:
  type: "position_controllers/JointPositionController"
  joint: "M_link1_M_link2"
  pid: {p: 100.0, i: 0.01, d: 10.0}

elbow_position_controller:
  type: "position_controllers/JointPositionController"
  joint: "M_link2_M_link3"
  pid: {p: 100.0, i: 0.01, d: 10.0}

wrist1_position_controller:
  type: "position_controllers/JointPositionController"
  joint: "M_link3_M_link4"
  pid: {p: 100.0, i: 0.01, d: 10.0}

wrist2_position_controller:
  type: "position_controllers/JointPositionController"
  joint: "M_link4_M_link5"
  pid: {p: 100.0, i: 0.01, d: 10.0}

wrist3_position_controller ...
(more)