Home | Tutorials | Wiki | Issues
Ask Your Question

psei's profile - activity

2017-06-14 15:08:26 -0500 received badge  Taxonomist
2016-09-23 17:05:21 -0500 received badge  Nice Question (source)
2016-07-14 22:33:15 -0500 received badge  Nice Answer (source)
2016-04-21 14:16:42 -0500 received badge  Student (source)
2013-12-16 13:17:07 -0500 received badge  Famous Question (source)
2013-10-21 15:26:26 -0500 received badge  Notable Question (source)
2013-10-21 02:40:04 -0500 commented question IMU sensor plugin libgazebo_ros_imu.so: strange data

I changed the links from https to http, does it work now?

2013-10-17 03:04:21 -0500 commented question IMU sensor plugin libgazebo_ros_imu.so: strange data

What do you mean by "broken"? Can't you see them?

2013-10-16 13:45:16 -0500 received badge  Popular Question (source)
2013-10-15 08:51:37 -0500 answered a question turnGravityOff tag doesn't work with groovy gazebo 1.5

"turnGravityOff" is not defined in SDF, try "gravity"

see http://gazebosim.org/sdf/1.4.html for all possible parameters

2013-10-15 08:50:44 -0500 received badge  Commentator
2013-10-15 05:41:34 -0500 marked best answer Gazebo 1.5: libgazebo_openni_kinect.so: pointcloud data is rotated and flipped?

Hi there!

I set up a gazebo simulation with the Clearpath Husky A200 robot, on which I mounted a kinect camera at the front bumper and a hokuyo laserscan on top of the rail.

Here is the situation: gazebo situation

For the hokuyo laser scan I use the "libgazebo_ros_laser.so" plugin. It works fine and provides the scan data on the "/scan" topic.

For the kinnect camera I am using the "libgazebo_openni_kinect.so", which provides "/kinect/image_raw", "/kinect/image_depth" and "/kinect/pointcloud" topics.

The camera can see this (screenshots taken from RVIZ):

"/kinect/image_raw": image raw

"/kinect/image_depth": image depth

So far, everything is looking good. So here comes the thing, when I tell RVIZ to show the "pointcloud" topic, which comes from the same camera, the siuation looks like this.

RIVZ pointcloud:

rviz

The red points indicate the edges of the trash dumpster, which is recognized correctly by the hokuyo laser scan.

But why the hell is the point cloud data coming from the kinect flipped and projected into the sky? I would have expected it to be overlaying with the red laserscan data... I tried the whole day rotating the data but could not find a solution. Does anyone know what to do?

Best regards psei

2013-10-15 05:41:34 -0500 edited answer Gazebo 1.5: libgazebo_openni_kinect.so: pointcloud data is rotated and flipped?

I solved my problem. Anyone who is experiencing the same problem can try this:

Update your "libgazebo_ros_depth_camera.cpp" or "libgazebo_ros_openni_kinnect.cpp" as following:

#include "pcl/common/eigen.h"
#include "pcl/common/transforms.h"

then, look for the line "pcl::toROSMsg(point_cloud, point_cloud_msg);" in function

bool GazeboRosDepthCamera::FillPointCloudHelper( sensormsgs::PointCloud2 &pointcloudmsg, uint32t rowsarg, uint32t colsarg, uint32t steparg, void* dataarg)

right before that, transform the cloud as following:

pcl::PointCloud<pcl::pointxyzrgb> transformed_cloud;
double rotx = 0.0;
double roty = M_PI/2.0;
double rotz = -M_PI/2.0;
Eigen::Matrix4f rotMatrixX;
Eigen::Matrix4f rotMatrixY;
Eigen::Matrix4f rotMatrixZ;

rotMatrixX <<
1.0, 0.0, 0.0, 0.0,

0.0, cos(rotx), -sin(rotx), 0.0,
0.0, sin(rotx), cos(rotx), 0.0,
0.0, 0.0, 0.0, 1.0;

rotMatrixY <<
cos(roty), 0.0, sin(roty), 0.0,

0.0, 1.0, 0.0, 0.0,
-sin(roty), 0.0, cos(roty), 0.0,
0.0, 0.0, 0.0, 1.0;

rotMatrixZ <<
cos(rotz), -sin(rotz), 0.0, 0.0,
sin(rotz), cos(rotz), 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0;

pcl::transformPointCloud(point_cloud,transformed_cloud, rotMatrixX * rotMatrixY * rotMatrixZ);
pcl::toROSMsg(transformed_cloud, point_cloud_msg);

2013-10-15 05:35:32 -0500 commented answer gazebo 1.9 libgazebo_ros_openni_kinect.so, incorrect plugin type?

If I understand you right, I had exact the same problem and I solved it as following: http://answers.gazebosim.org/question/4266/gazebo-15-libgazebo_openni_kinectso-pointcloud/

2013-10-15 05:32:34 -0500 commented answer kineckt is not available in my rostopic list!!!

With the configuration above you should see a "/camera/rgb/image_raw" topic. This is the RGB image. As far as I can see, the simulated kinect does not have an IR-Image topic (only depth).

2013-10-14 07:27:17 -0500 commented answer ros_controllers problems
2013-10-14 07:26:55 -0500 asked a question IMU sensor plugin libgazebo_ros_imu.so: strange data

Hello community,

I have a problem with the simulated data of the "libgazebo_ros_imu.so" plugin.

Here is my urdf code:

<robot>
<link name="imu_link">
    <inertial>
        <mass value="${dummy_mass}" />
        <origin xyz="0 0 0" />
        <inertia ixx="${dummy_inertia}" ixy="0.0" ixz="0.0"
                 iyy="${dummy_inertia}" iyz="0.0" 
                 izz="${dummy_inertia}" />
    </inertial>     
        <visual>
        <origin xyz="0 0 0" rpy="0 0 0" />
        <geometry>
            <box size = "0.1 0.1 0.1"/> 
                </geometry>
        </visual>
    <collision>         
        <geometry>
            <box size = "0.1 0.1 0.1"/> 
        </geometry>
    </collision>     
    </link>

<joint name="imu_joint" type="fixed">
    <axis xyz="0 0 0"/>
    <origin xyz="0.05 0 0.15" rpy="0 0 0" />
    <parent link="base_link"/>
    <child link="imu_link" />
</joint>

<gazebo>    
    <plugin name="imu_plugin" filename="libgazebo_ros_imu.so">
        <alwaysOn>true</alwaysOn>       
        <bodyName>imu_link</bodyName>
        <topicName>imu_data</topicName>
        <serviceName>imu_service</serviceName>
        <gaussianNoise>0.0</gaussianNoise>
        <updateRate>10.0</updateRate> 
    </plugin>
</gazebo>
</robot>

With these settings I can read from the rostopic "imu_data", but the simulated data is really strange and not fitting to the movement of the robot at all. It seems as it just ignores the movement. For example, even when standing completely still, I see very high values for up / down movement, they just seem randomly generated.

When moving forward or backward, it doesnt seem to affect the simulated imu data as well.

Here are some screenshots. Position of the camera was behind the robot looking forward. Imagine that the arrow that shows the imu sensor data flips up and down at a very high rate during a short period of time. The robot isnt moving at all.

IMU data 1 IMU data 3 IMU data 4

Any tips for improvement?

regards psei

2013-10-14 05:43:53 -0500 answered a question gazebo 1.9 libgazebo_ros_openni_kinect.so, incorrect plugin type?

There are different types of plugins, I think there are model-, sensor- and worldplugins.

libgazebo_ros_openni_kinect.so is a sensor plugin, and the way you have coded your URDF it is treated as a model plugin.

Let me show the difference:

<gazebo>
  <plugin>
  ...
  </plugin>
</gazebo>

defines a model plugin. But you need a sensor plugin. Try this:

<gazebo reference="my_sensor_link">
  <sensor>
     <plugin>
      ...
     </plugin>
  <sensor>
</gazebo>

My URDF for kinect cam looks like this:

<!-- SENSOR -->
<gazebo reference="openni_camera_link">
    <sensor type="depth" name="openni_camera_camera">       
        <always_on>1</always_on>
        <visualize>true</visualize>             
        <camera>
            <horizontal_fov>1.047</horizontal_fov>  
            <image>
                <width>640</width>
                <height>480</height>
                <format>R8G8B8</format>
            </image>
            <depth_camera>

            </depth_camera>
            <clip>
                <near>0.1</near>
                <far>100</far>
            </clip>
        </camera>
        <plugin name="camera_controller" filename="libgazebo_ros_openni_kinect.so">
            <alwaysOn>true</alwaysOn>
                <updateRate>10.0</updateRate>
                <cameraName>camera</cameraName>
                <frameName>openni_camera_link</frameName>                   
            <imageTopicName>rgb/image_raw</imageTopicName>
            <depthImageTopicName>depth/image_raw</depthImageTopicName>
            <pointCloudTopicName>depth/points</pointCloudTopicName>
            <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>              
            <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>            
            <pointCloudCutoff>0.4</pointCloudCutoff>                
                <hackBaseline>0.07</hackBaseline>
                <distortionK1>0.0</distortionK1>
                <distortionK2>0.0</distortionK2>
                <distortionK3>0.0</distortionK3>
                <distortionT1>0.0</distortionT1>
                <distortionT2>0.0</distortionT2>
            <CxPrime>0.0</CxPrime>
            <Cx>0.0</Cx>
            <Cy>0.0</Cy>
            <focalLength>0.0</focalLength>
            </plugin>
    </sensor>
</gazebo>
2013-10-14 05:34:31 -0500 answered a question kineckt is not available in my rostopic list!!!

Hi, before you can see/access any topics for sensors in gazebo, you need to load the corresponding plugin.

I actually do not have an SDF-version, but my URDF file for the kinect looks like this. (I assume that you already have a link and a joint for the sensor, e.g. kinect)

<!-- SENSOR -->
<gazebo reference="openni_camera_link">
    <sensor type="depth" name="openni_camera">      
        <always_on>1</always_on>
            <visualize>true</visualize>             
        <camera>
            <horizontal_fov>1.047</horizontal_fov>  
            <image>
                <width>640</width>
                <height>480</height>
                <format>R8G8B8</format>
            </image>
            <depth_camera>

            </depth_camera>
            <clip>
                <near>0.1</near>
                <far>100</far>
            </clip>
        </camera>
        <plugin name="camera_controller" filename="libgazebo_ros_openni_kinect.so">
            <alwaysOn>true</alwaysOn>
                <updateRate>10.0</updateRate>
                <cameraName>camera</cameraName>
                <frameName>openni_camera_link</frameName>                   
            <imageTopicName>rgb/image_raw</imageTopicName>
            <depthImageTopicName>depth/image_raw</depthImageTopicName>
            <pointCloudTopicName>depth/points</pointCloudTopicName>
            <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>              
            <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>            
            <pointCloudCutoff>0.4</pointCloudCutoff>                
                <hackBaseline>0.07</hackBaseline>
                <distortionK1>0.0</distortionK1>
                <distortionK2>0.0</distortionK2>
                <distortionK3>0.0</distortionK3>
                <distortionT1>0.0</distortionT1>
                <distortionT2>0.0</distortionT2>
            <CxPrime>0.0</CxPrime>
            <Cx>0.0</Cx>
            <Cy>0.0</Cy>
            <focalLength>0.0</focalLength>
            </plugin>
    </sensor>
</gazebo>
2013-10-10 05:52:13 -0500 commented answer ros_controllers problems

Does this IMU plugin simulate realistic data? I tried to simulate my IMU with "libgazebo\_ros\_imu.so", but the simulated data doesnt look very good....

2013-09-25 19:15:39 -0500 received badge  Famous Question (source)
2013-09-25 19:15:01 -0500 received badge  Nice Answer (source)
2013-09-15 10:06:48 -0500 received badge  Teacher (source)
2013-09-15 10:06:48 -0500 received badge  Necromancer (source)
2013-09-13 03:16:52 -0500 commented answer Gazebo 1.5: libgazebo_openni_kinect.so: pointcloud data is rotated and flipped?
2013-09-13 03:07:52 -0500 answered a question Not publishing Camera Info topic and I receive the follow message "WARNING: no messages received and simulated time is active. Is /clock being published?" <depthImageCameraInfoTopicName>

Whats your output of "rostopic list" ?

To view the camera info topic, you should type "rostopic echo /kinect_camera/camera/depth_registered/camera_info" according to your configuration.

2013-09-12 09:26:19 -0500 received badge  Notable Question (source)
2013-09-10 10:06:37 -0500 answered a question Kinect depth data is saturated to 1 meter

Hi Tirjen,

have you tried <visualize>false</visualize> in the <sensor> ... </sensor> part? The flat pointcloud in RVIZ that you describe could be the real-time projection of the camera image into RVIZ.

Regards

psei

2013-09-10 08:38:40 -0500 answered a question How to use included models with plugins (ROS Hydro and stand alone Gazebo)

Hi Juan,

I think there is no "correct" way to do this. For myself I like to separate my robot parts into different files, which are included in a central masterfile. This way, I am able to enable/disable robot parts very quickly. If you choose to put the different parts into different subfolders or not depends on your own taste.

Further more, I used the mesh files that come with gazebo to visualize my sensor (e.g. model://hokuyo/meshes/hokuyo.dae), but since I wanted to use ROS messages, I needed to modify the used plugin "libRayPlugin.so" to "libgazebo_ros_laser.so" anyways, and therefore I wrote my own version of the hokuyo laser scan.

Since I dont use Hydro and standalone gazebo, but groovy and gazebo 1.5, i cant provide any SDF code, because I coded in URDF.

Regards

psei