ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Tobias Neumann's profile - activity

2023-04-01 06:22:24 -0500 received badge  Nice Question (source)
2022-08-25 08:40:43 -0500 received badge  Famous Question (source)
2022-06-07 08:17:10 -0500 received badge  Taxonomist
2022-05-10 04:01:27 -0500 received badge  Enlightened (source)
2022-05-10 04:01:27 -0500 received badge  Good Answer (source)
2021-11-22 06:34:33 -0500 received badge  Notable Question (source)
2021-11-16 10:15:27 -0500 commented question sdk from meta-ros

Hi, sry for my late reply. I missed your request. I've added a description of the steps I took till now.

2021-11-16 10:12:55 -0500 answered a question sdk from meta-ros

I've never build a ROS 2 only ROOTFS/toolchain, it was always included in the company internal project. And it is also n

2021-11-03 00:37:08 -0500 received badge  Popular Question (source)
2021-08-12 09:41:46 -0500 commented question sdk from meta-ros

Building single ROS dependent cmake projekts seems to works now, with the above described steps (only tested with a very

2021-08-06 10:53:11 -0500 commented question sdk from meta-ros

After that, it seems like only foonathan-memory-staticdev where missing for a first minimal working version. However the

2021-08-06 04:41:45 -0500 commented question sdk from meta-ros

The problem regarding the not found RMW_IMPLEMENTATION where caused by the ament_index not been set up correctly. I coul

2021-08-05 10:45:14 -0500 commented question sdk from meta-ros

The problem regarding the not found RMW_IMPLEMENTATION where caused by the ament_index not been set correctly. I could b

2021-08-05 03:04:31 -0500 asked a question sdk from meta-ros

sdk from meta-ros Hi, I'm trying to get a minimal setup of ROS 2 working for my companies eco system, which requires an

2021-07-22 09:31:44 -0500 received badge  Famous Question (source)
2021-07-22 09:31:44 -0500 received badge  Notable Question (source)
2021-01-15 12:52:15 -0500 commented answer Create (all) deb-packages of ROS distro

Thank you for these clear warnings ;). It would be nice if you could give me a heads up when you have the first version

2021-01-14 09:06:35 -0500 commented answer Create (all) deb-packages of ROS distro

Thank you very much for your answer. I hoped that there would be a minimal setup or workaround. I'm not sure if Fat Arc

2021-01-11 04:44:06 -0500 received badge  Popular Question (source)
2021-01-07 10:51:55 -0500 asked a question Create (all) deb-packages of ROS distro

Create (all) deb-packages of ROS distro Hello, in the group I'm working at we're started to use ROS 2 (currently Foxy)

2019-04-08 07:25:59 -0500 received badge  Good Question (source)
2018-11-07 03:51:32 -0500 marked best answer Get one(pitch) euler angle between two orientations (quaternions)

Hi,

I want to get the angle between 2 quaternions (as euler angle), but the angle always needs to be from q1 to q2 (not the shortest angle). But since there are two ways to get an angle, I need to find the one I need. The following code works, but I'm looking for a nicer solution.

// calculate difference
ori_diff = q1.inverse() * q1;

//just use the pitch part
ori_diff.setValue(0., ori_diff.y(), 0., ori_diff.w());
ori_diff.normalize();

//get euler angle
tf::Matrix3x3 m;
m.setRotation(ori_diff);

tfScalar r1, r2, p1, p2, y1, y2;
m.getRPY(r1, p1, y1, 1);
m.getRPY(r2, p2, y2, 2);

if (        r1 == 0 && y1 == 0 ) {
  euler_angle = p1;
} else if ( r2 == 0 && y2 == 0) {
  euler_angle = p2;
} else {
  ROS_ERROR( ... );
}
2018-11-07 03:51:27 -0500 answered a question Get one(pitch) euler angle between two orientations (quaternions)

In the angles.h from the angles package one can found a lot of functions.

2018-11-07 03:47:13 -0500 marked best answer tf::TransformListener gets wrong tf

Hello,

TL;DR tf::TransformListener gets a different transform than shown in RVIZ

I am having quite a strange problem. I am using a rosbag file to playback recorded data and I am adding new transforms and using them while doing that:

rosparam set use_sim_time true
rosbag play 2016-09-12-14-51-41.bag --clock

The transform is published with a python node, where the origin is static (defined with cfg-values) and the rotation is coming from the values of an IMU. The interesting part how the tf is published should be this (in the callback of the IMU subscription):

  br = tf.TransformBroadcaster()
  br.sendTransform((frame_offset_x, frame_offset_y, frame_offset_z),
               quaternion,
               rospy.Time.now(),
               frame_child,
               frame_parent
              )

With the following values:

  frame_offset_x = 0
  frame_offset_y = 0
  frame_offset_z = 1.2
  quaternion = rotation of the IMU (only around the x and y axis)
  frame_child = level_laser_2
  frame_parent = base_footprint

The created Transform in RVIZ looks like expected. It's 1.2m above base_footprint with some rotation on top. In the picture, the Fixed Frame is set to "base_footprint"

level_tf in RVIZ

However if I lookup the transform in a ROS node using the tf::TransformListener I get a different result:

#include <tf/transform_datatypes.h>
#include <tf/transform_listener.h>
...
  tf_listener_ = new tf::TransformListener( ros::Duration(10) ); // in the constructor
...
void callback( const sensor_msgs::PointCloud2Ptr& cloud_in ) {
  ...
  if ( tf_listener_->waitForTransform(tf_target_,
                                      cloud_in->header.frame_id,
                                      cloud_in->header.stamp,
                                      ros::Duration( scan_time_ )) ) {
    tf::StampedTransform transform;
    tf_listener_->lookupTransform(tf_target_,
                                  cloud_in->header.frame_id,
                                  cloud_in->header.stamp,
                                  transform);
    ROS_INFO("%s %s -> %s\tat%lf", node_name_.c_str(),
                                   cloud_in->header.frame_id.c_str(),
                                   tf_target_.c_str(),
                                   cloud_in->header.stamp.toSec());

    tfScalar tf[16];
    transform.getOpenGLMatrix(tf);

    ROS_INFO("%s\n"
             "/ %lf\t%lf\t%lf\t%lf \\\n"
             "| %lf\t%lf\t%lf\t%lf |\n"
             "| %lf\t%lf\t%lf\t%lf |\n"
             "\\ %lf\t%lf\t%lf\t%lf /", node_name_.c_str(),
             tf[0], tf[4], tf[8], tf[12],
             tf[1], tf[5], tf[9], tf[13],
             tf[2], tf[6], tf[10], tf[14],
             tf[3], tf[7], tf[11], tf[15]);
  } else {
    // display error here 
  }
  ...
}

The output of this is:

[ INFO] [1473756806.521699009, 1473684710.202103154]: /level_laser_velodyne:  base_footprint -> level_laser_2 at1473684709.395050
[ INFO] [1473756806.521764836, 1473684710.202103154]: /level_laser_velodyne: 
/ 0.997645  0.001908    -0.068567   0.002741 \
| 0.001908  0.998454    0.055557    -0.002221 |
| 0.068567  -0.055557   0.996098    -0.039822 |
\ 0.000000  0.000000    0.000000    1.000000 /

But it should be something like:

[ INFO] [1473756806.521764836, 1473684710.202103154]: /level_laser_velodyne: 
/ R R R 0 \
| R R R 0 |
| R R R 1.2 |
\ 0 0 0 1 /

Does anybody know what I am doing wrong?

Thank you for your help, Tobias

2018-11-07 03:47:07 -0500 answered a question tf::TransformListener gets wrong tf

It's not solved, but I've found a workaround by using a different node and therefore I'm closing this question. I'm sor

2018-11-07 03:45:18 -0500 commented answer tf::TransformListener gets wrong tf

Thank you, that might've be wrong as well. But I would have expected a translation of 1.2m, instead I got something arou

2018-02-02 09:37:58 -0500 received badge  Famous Question (source)
2018-01-30 12:11:00 -0500 received badge  Famous Question (source)
2017-07-24 17:10:35 -0500 received badge  Famous Question (source)
2017-07-11 09:18:38 -0500 marked best answer Getting hierarchy level of yaml parameter

Hi,

I want to use ros param to traverse files like this:

pcl_filter:
  filter:
    filter_cascade_1: 
      in:  cloud_in
      out: cloud_out
      filter:
        first_applied_filter:
          - config_for_filter_1
          - config_for_filter_2
        second_applied_filter:
          - config_for_filter_1
          - config_for_filter_2
    filter_cascade_2:
      in:  other_cloud_in
      out: other_cloud_out
      filter:
        first_applied_filter:
          - config_for_filter_1
          - config_for_filter_2
        second_applied_filter:
          - config_for_filter_1
          - config_for_filter_2

There I would like to get all cascades of the param "filter". In the node pcl_filter I search for something like

std::vector<std::string> param;
getParam("filter", param);

But this just seems to work with something like:

pcl_filter:
  filter:
    - filter_cascade_1
    - filter_cascade_1

And:

std::map<std::string, std::string> param;
getParam("filter", param);

just workes with:

pcl_filter:
  filter:
    filter_cascade_1: a
    filter_cascade_1: b

Does somebody know a way to get all of these parameter?

Thanks for your help

2017-06-23 11:48:53 -0500 received badge  Nice Answer (source)
2017-06-23 11:48:51 -0500 received badge  Notable Question (source)
2017-04-20 16:26:56 -0500 marked best answer velodyne_driver displays ellipse of laser beams instead of circle

Hello, we are using the Velodyne HDL-64E S2 with ROS Hydro for indoor mapping. During this we saw, that the ROS.driver for the Velodyne creates Pointclouds where the Laser-beams are in an ellipse instead of a cicle.

In the following archive are 3 Scans taken at the same possition: archive

  • "shelf.pcap": recorded with the original DSR-driver (Version 2.0.0)
  • "2014-01-30-12-49-45_0.bag": recorded with the ROS-driver
  • "2014-01-30-15-17-49_0.bag": recorded with the PCL-HDL-grabber (the pointcloud is turned by 90° for some reason)

There you can see the same room (and out of the window). Where the scans taken with the original- and pcl-driver are showing straight walls, the ros-driver does not.

The following archive shows the same drivers at a different possition, where the laser-beams hitting mostly the ground: archive

  • "floor.pcap": recorded with the original DSR-driver (Version 2.0.0)
  • "2014-01-30-16-49-10_0.bag": recorded with the ROS-driver
  • "2014-01-30-16-50-23_0.bag": recorded with the PCL-HDL-grabber

There you can see that the original- and pcl-driver are displaying one beam as a circle, where the ros-driver is creating an ellipse.

This is the launch-file that was used for the ros-driver: file

Does anybody has the same experience and/or a solution, or do we have an error in our launch-file?

2017-02-24 07:09:07 -0500 received badge  Nice Question (source)
2017-02-23 11:35:05 -0500 received badge  Popular Question (source)
2017-02-23 06:58:52 -0500 marked best answer Playback of rosbag with tf2-static transforms

Hello ROS users,

I've got a robot setup where (most) of the static transforms are defined by an URDF (which results in tf2-static tfs). During a testrun we recoded plenty of bag-files which where splitted after 1 min.

The static transforms are only contained in the 1. bagfile.

(1. Question) Is there a way to record splitted bagfiles with static-tfs, that the static-tfs are contained in each bag-file?

Furthermore (2. question), if the bagfile containing the static-tfs is played, they are only received by rviz (and probably other nodes as well) if rviz was started prior the playback of the bag-file, which seems for me like a bug. Is there a solution to fix that (e.g. have rviz receiving the static-tfs even when its started lets say 2sec after the rosbag playback started)?

regards
Tobias

2017-02-23 06:47:37 -0500 received badge  Self-Learner (source)
2017-02-23 06:47:37 -0500 received badge  Teacher (source)
2017-02-23 06:41:42 -0500 marked best answer How to detect broken rosbag files

Hello ROS users,

I've recorded plenty rosbag files during a testrun with a 1min split and lz4 compression. Afterwards some of the data got corrupted (by the harddrive, not an error with rosbag). When playing the rosbag files, it works and starts normally, but if rosbag hits a broken file, I get the following msg:

ROSLZ4_DATA_ERROR: malformed data to decompress

I now want to identify the broken rosbag-files and either try to fix them or if they are not fixable, delete them. But I don't find a way to identify these broken files, does anybody know a way?

My first thought was to use "rosbag check", but this seems not to be intended for this use, or is it and I am not able to see this?

Does anybody had a similar problem and does know a solution in the ROS eco-system?

kindly regards
Tobias

2017-02-23 06:41:36 -0500 answered a question How to detect broken rosbag files

Since there does not seem to be a solution within the ROS eco system, I wrote a script that uses rosbag decompress to go though all bag-files, detects which are broken and then reindexes them.

#!/bin/bash
decompressed_bags=/media/tneumann/fd783860-83b8-4729-8ea5-eee3e08bb9c5/trash/
reindexed_bags=/media/tneumann/fd783860-83b8-4729-8ea5-eee3e08bb9c5/reindexed/
broken_bags=""
for bag in *.bag; do
  if [[ -n $( rosbag decompress --output-dir=$decompressed_bags $bag 2>&1 > /dev/null ) ]]; then
    echo $bag
    broken_bags="$broken_bags $bag"
  fi  
  rm ${decompressed_bags}/${bag}
done

echo -e "Broken bag files:\n $broken_bags\nStart reindexing\n"
mkdir broken/

for bag in $broken_bags; do
  mv $bag broken/
  rosbag reindex --output-dir=$reindexed_bags broken/$bag
done

This is of course not my preferred solution but it works, if your bag-files are not compress this might not work, you can try to use "rosbag play -i" instead, but this just triggers an error if you also listen on the published topics.

regards
Tobias

2017-02-22 12:22:40 -0500 received badge  Notable Question (source)