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

mgruhler's profile - activity

2023-08-10 06:47:12 -0500 received badge  Good Answer (source)
2023-07-15 00:56:27 -0500 received badge  Good Answer (source)
2023-05-01 00:02:05 -0500 received badge  Nice Answer (source)
2023-02-23 10:32:46 -0500 received badge  Good Answer (source)
2023-01-20 14:37:58 -0500 received badge  Nice Answer (source)
2022-12-19 11:50:42 -0500 received badge  Nice Answer (source)
2022-08-26 16:24:21 -0500 marked best answer testing launch files in install_space?

Hi all,

The question I have is actually pretty short:

Is there a way to run roslaunch checks in an install space?

Let me give you a short rationale of my current thoughts:

In ROS, there are three different types of tests you can have (afaik):

  1. Unit Tests (using gtest or unittest) for testing functionality
  2. rostests for testing ROS Nodes and other ROS stuff (e.g. publishers/subscribers)
  3. roslaunch checks (very bottom of the page) using roslaunch_add_file_check

IMO, 1. and 2. should be run in the build/devel space, as those test targets and launchfiles should not be installed (even though there are some packages doing this, e.g. gazebo_plugins/test/set_model_state_test, which then does fail as the required test executable is not, and cannot be, installed.)

However, for 3. it would be beneficial to check this in the install space as well. This would help to detect missing install tags of executables, launch files and yaml files.

How can I achieve this? catkin_make run_tests is always running in devel/build/src.

2022-06-29 02:58:38 -0500 marked best answer When is ${catkin_EXPORTED_TARGETS} needed

This is basically a follow-up to #q285772 During my use of ROS, I adopted to call the following line on any (C++) target that I try to build:

add_dependencies(MYTARGET ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

using ${${PROJECT_NAME}_EXPORTED_TARGETS} only when building msg/srv/actions/dynamic_reconfigure in the package I am workin on, and ${catkin_EXPORTED_TARGETS} always.

This is a constant source of error, as well in the above cited question. Thus, I always adviced People to follow the same strategy.

In a comment to the above question, @gvdhoorn described the approach to always use ${catkin_EXPORTED_TARGETS} as "cargo-cultish" (nice term :-D)

re: adding catkin_EXPORTED_TARGETS: that's a bit cargo cult-ish. I wouldn't add that unless it's needed.

Checking the documentation (e.g. wiki, catkin docs 1 or catkin docs 2) I'm not quite sure when to use it.

The wiki suggest that:

If you have a target which (even transitively) depends on some other target that needs messages/services/actions to be built, you need to add an explicit dependency on target catkin_EXPORTED_TARGETS, so that they are built in the correct order. This case applies almost always, unless your package really doesn't use any part of ROS. Unfortunately, this dependency cannot be automatically propagated. (some_target is the name of the target set by add_executable()):

add_dependencies(some_target ${catkin_EXPORTED_TARGETS})

This is basically saying: You Need it always (solution 1).

The catkin docs rather say, if you Need any msg/srv/action/dynamic_reconfigure from another catkin package (solution 2).

Which is the right way to go? I'd be happy for any insights.

2022-06-22 09:21:01 -0500 received badge  Good Question (source)
2022-06-10 06:13:06 -0500 received badge  Nice Answer (source)
2022-05-23 21:00:43 -0500 received badge  Nice Answer (source)
2022-05-13 07:20:45 -0500 received badge  Nice Answer (source)
2022-04-14 09:44:26 -0500 received badge  Good Answer (source)
2022-03-25 06:18:11 -0500 received badge  Nice Answer (source)
2022-03-01 03:14:18 -0500 received badge  Nice Answer (source)
2022-02-28 03:20:25 -0500 commented question E: Unable to locate package ros-noetic-mavros

Can you answer the questions in the comments posted above?

2022-02-07 04:30:41 -0500 received badge  Good Answer (source)
2022-01-24 11:25:00 -0500 received badge  Good Answer (source)
2022-01-13 17:59:04 -0500 received badge  Nice Answer (source)
2021-12-18 23:43:34 -0500 marked best answer static_layer gets deleted by obstacle_layer in global_costmap

Previously (i.e. pre-hydro) it has been possible to have a global_costmap that takes in sensor data as well as the static map from the map_server. If I remember correctly, this allowed to have the sensor data "clear" data of the static map to plan through, e.g., doors that had been closed during mapping.

With the current system, I haven't been able to reproduce this behaviour. Even stranger: as soon as I add an obstacle_layer to the global_costmap (even without receiving any data on the configured sensor), the global_costmap simply doesn't receive any data at all. I.e. the robot plans the direct path to the goal, through whatever is set in the map_server.

I'm not sure if this is a configuration issue on my end, or if this is really something that is not possible with the layered costmap approach. Even if the "clearing" behaviour is hard to realize, my current system should end up with an "overlay" of the single layers. I.e. the static_layer should still show. This is also how I understand this paper by @David Lu.

I created a minimal example (see below). This example is stand-alone and doesn't depend on Gazebo or a robot.

Any hint to where I have made a mistake would be highly appreciated!


Results

The trick was really the combination_method parameter in combination with the track_unknown_space parameter.

(Note: I used some fake laser which simply published a circle with radius 3m at 1° angular resolution. Also, the images only show the robot_footprint and the resulting global_costmap)

  • I: The behaviour I experienced. static_layer gets completely overwritten by obstacle_layer
  • II: behaviour I wanted. static_layer gets only overwritten by obstacle_layer where there are actually some measurements (see the light blue traces along the rays. It is not free space, but you see the effect). If you plan a path, it tries to follow any observations, if possible, and only cross unkown space if required (leads to some zigzag behaviour along the rays of the scans)
  • III: default behaviour: obstacles present in either static_layer or obstacle_layer are used
  • IV: afair, same as III for the costmap, though planning will happen as in II.

Below some pictures of the different combinations:

I: combination_method: 0, track_unkown_space: false image description II: combination_method: 0, track_unkown_space: true image description III: combination_method: 1, track_unkown_space: false image description IV: combination_method: 1, track_unkown_space: true image description


Minimal Example

Put the following files in your home. You'll need a map to pass to the map_server as well as rviz with a proper configuration (map, global_costmap, maybe robot_footprint).

Play around with using the obstacle_layer in the global_costmap to see the different results.

movebase.launch

<?xml version="1.0"?>
<launch>

  <!-- delete old parameters -->
  <rosparam command="delete" param="/move_base"/>

  <node name="map_server" pkg="map_server" type="map_server" args="/PATH/TO/MAP"/>

  <node name="map_to_odom" pkg="tf" type="static_transform_publisher" args="2 0 0 0 0 0 map odom 10"/>
  <node name="odom_to_base_link" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 odom base_link 10"/>

  <node pkg="move_base" type ...
(more)
2021-11-18 04:41:55 -0500 received badge  Good Answer (source)
2021-11-15 14:58:12 -0500 received badge  Good Answer (source)
2021-11-03 12:25:16 -0500 received badge  Guru (source)
2021-11-03 12:25:16 -0500 received badge  Great Answer (source)
2021-10-15 03:39:45 -0500 received badge  Good Answer (source)
2021-10-14 11:07:21 -0500 received badge  Good Answer (source)
2021-10-12 02:17:01 -0500 received badge  Nice Answer (source)
2021-09-22 07:04:12 -0500 received badge  Good Answer (source)
2021-08-23 02:50:37 -0500 commented question what does it mean like undefined reference?

This is a standard C++ error, see also error: ld returned 1 exit status. Basically, you forgot to link to the library de

2021-08-23 02:49:05 -0500 edited question what does it mean like undefined reference?

what does it mean like undefined reference? straight dump of the console output: srinaath@srinaath-desktop:~/catkin_ws3

2021-08-20 06:02:31 -0500 commented answer Using Publisher inside a Subscriber callback function

happens to all of us :-) Please accept the answer by clicking the checkmark next to it, thanks.

2021-08-19 01:02:09 -0500 edited answer Using Publisher inside a Subscriber callback function

Well, I guess it has to do with trying to advertise using a subscriber :-) It should be subscribe... sub{nh.subscribe(

2021-08-19 01:01:48 -0500 received badge  Rapid Responder (source)
2021-08-19 01:01:48 -0500 answered a question Using Publisher inside a Subscriber callback function

Well, I guess it has to do with trying to advertise using a subscriber :-) It should be subscribe... ub{nh.advertise&l

2021-08-19 00:58:34 -0500 commented question /home/youruser/catkin_ws/src:/opt/ros/kinetic/share bash: /home/youruser/catkin_ws/src:/opt/ros/kinetic/share: No such file or directory

It would probably help if you direct us to the installation page where you got this from (link!) and show which commands

2021-08-17 02:47:16 -0500 edited answer Questions Regarding ROS Package Dependencies

It depends a bit which language you are using (you say "imported" and numpy, so I guess python). If you are using pyth

2021-08-17 02:45:46 -0500 commented answer Questions Regarding ROS Package Dependencies

see edit above.

2021-08-17 02:45:40 -0500 edited answer Questions Regarding ROS Package Dependencies

It depends a bit which language you are using (you say "imported" and numpy, so I guess python). If you are using pyth

2021-08-17 00:40:30 -0500 received badge  Rapid Responder (source)
2021-08-17 00:40:30 -0500 answered a question Questions Regarding ROS Package Dependencies

It depends a bit which language you are using (you say "imported" and numpy, so I guess python). If you are using pyth

2021-08-06 02:16:24 -0500 commented question How can I get the src directory of a package in a ROSLaunch file.

Funny, on noetic and using rospy / catkin_build I cannot reproduce this. It is pointing to the src directory for me. Wha

2021-08-06 02:15:43 -0500 commented question How can I get the src directory of a package in a ROSLaunch file.

Funny, on noetic and using rospy / catkin_build I cannot reproduce this. It is pointing to the src directory for me. Wha

2021-08-04 10:24:42 -0500 commented question Problem publish and record big data

@ssfs have fun :-) If this solves it, please consider to self-answer and accept (or close as answered and correct). Than

2021-08-04 08:19:36 -0500 commented question Problem publish and record big data

For some background on why the foxy-future branch might solve this issue, spen about an hour of your time to read throug

2021-08-04 08:16:36 -0500 commented question GPS and SLAM

@Masoum great and thanks for the update.

2021-08-04 01:55:01 -0500 commented question How to handle private/personal ros package dependencies

Have you looked into the existing Q&As for that? There are quite a lot that talk about this. Though, admittedly, the

2021-08-04 01:46:32 -0500 edited question doosan robot [pid 7321, exit code 1, cmd /home/kim/catkin_ws/src/doosan-robot/common/bin/DRCF/run_drcf.sh 12345 m0609 __name:=drcf __log:=/home/kim/.ros/log/0d93ac3e-f4c9-11eb-9f98-40b076dd2030/dsr01-drcf-3.log ] error

Hi I have an error right now, please solve this error version ubuntu 18.04 ros melodic Hello. I am trying to run Doos

2021-08-04 01:45:58 -0500 commented question GPS and SLAM

This question #q383764 by the same user seems to give some background. @Masoum I suggest you merge the two questions and

2021-07-30 09:12:36 -0500 received badge  Nice Answer (source)