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

MarcoStb's profile - activity

2022-08-04 05:04:50 -0500 marked best answer range_sensor_layer::RangeSensorLayer does not exit

Hi, I'm using ROS Kinetic and I'm currently trying to set up the navigation package. I've got a hexapod with a lidar on top and navigation is working fine for this configuration. But recently I added an ultrasonic sensor to the front to avoid bumping into glas doors and unfortunately I can't get the range_sensor_layer to run.

This is my costmap_common_params.yaml:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.3, 0.3], [0.3, -0.3], [-0.3, -0.3], [-0.3, 0.3]]
#robot_radius: ir_of_robot
inflation_radius: 0.35


observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: laser_frame, data_type: LaserScan, topic: scan, marking: true, clearing: true}

plugins:
  - {name: sonar_layer,   type: "range_sensor_layer::RangeSensorLayer"} 

sonar_layer:
  topics: ["/us/range"]

My local_costmap_params.yaml:

local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

And my global_costmap_params.yaml:

global_costmap:
  global_frame: /map
  robot_base_frame: base_footprint
  update_frequency: 5.0
  static_map: true

When I try to launch navigation I get this error, which leads to the process move_base dying:

[ INFO] [1455210855.302734798]: Using plugin "sonar_layer" terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
what(): According to the loaded plugin descriptions the class range_sensor_layer::RangeSensorLayer with base class type costmap_2d::Layer does not exist. Declared types are costmap_2d::InflationLayer costmap_2d::ObstacleLayer costmap_2d::StaticLayer costmap_2d::VoxelLayer rtabmap_ros::StaticLayer

I tried to put the plugins-tag into local_costmap_params.yaml already which lets navigation get launched but it will ignore the range-message for obstacle detection. The topic \us\range is not subscribed by any other node in this configuration.

Is there anything I did wrong with including the range_sensor_layer-plugin for navigation?

2021-10-21 09:42:41 -0500 received badge  Notable Question (source)
2021-09-14 00:44:50 -0500 received badge  Enlightened (source)
2021-09-14 00:44:50 -0500 received badge  Good Answer (source)
2021-06-10 07:14:28 -0500 received badge  Nice Answer (source)
2021-05-04 09:10:39 -0500 received badge  Popular Question (source)
2021-04-22 14:43:45 -0500 asked a question Reworked Velodyne driver causes OctoMap segmentation fault

Reworked Velodyne driver causes OctoMap segmentation fault Hey, I am running Ubuntu 18 with ROS Melodic and with the Vel

2021-03-25 03:27:37 -0500 edited answer Global planner makes robot drive in circles along U shaped path

Edit: I recently stumbled upon this answer and tried it myself. Reducing the rolling window size to around twice/thrice

2021-03-25 03:19:00 -0500 edited answer Global planner makes robot drive in circles along U shaped path

Edit: I recently stumbled upon this answer and tried it myself. Reducing the rolling window size to around twice the siz

2021-02-25 03:26:57 -0500 received badge  Student (source)
2021-01-23 23:13:53 -0500 received badge  Famous Question (source)
2020-11-25 00:44:27 -0500 marked best answer Prerelease melodic Qt5 cmake error

Hey, I am currently trying to do my prerelease tests for a melodic version of my meta-package robot_statemachine which was already released for kinetic.

Unfortunately, when running the prerelease tests for melodic, I encountered various errors related to Qt5 dependencies. The meta-package includes two packages which are basically plugins, one for rqt and the other for rviz. Unfortunately, when running the prerelease script on docker, both fail with the below errors:

rsm_rviz_plugins error:

CMake Error at CMakeLists.txt:31 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" (requested
  version 5.9.5) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.

rsm_rqt_plugins error:

CMake Error at CMakeLists.txt:17 (find_package):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.

After some research I found this question. Following the answer I added a build dependency for qtbase5-dev. Unfortunately, this only lead to the following new error:

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "qtbase5-dev" with
  any of the following names:

    qtbase5-devConfig.cmake
    qtbase5-dev-config.cmake

  Add the installation prefix of "qtbase5-dev" to CMAKE_PREFIX_PATH or set
  "qtbase5-dev_DIR" to a directory containing one of the above files.  If
  "qtbase5-dev" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:6 (find_package)

Therefore, my question: Could someone point me out how to correctly include the Qt5 dependencies for rviz and rqt plugins in ROS melodic? Below you can see my CMakeLists and package files for the two packages throwing errors.

rsm_rqt_plugins: CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(rsm_rqt_plugins)

add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rqt_gui
  rqt_gui_cpp
  rsm_msgs
  std_msgs
  std_srvs
)

set(CMAKE_AUTORCC ON)
find_package(cmake_modules REQUIRED)
find_package(Qt5Widgets REQUIRED)
include_directories(${Qt5Widgets_INCLUDE_DIRS} include)

###################################
## catkin specific configuration ##
###################################

catkin_package(
  INCLUDE_DIRS ${INC_DIR}
  LIBRARIES ${PROJECT_NAME}
  ${CMAKE_CURRENT_BINARY_DIR}/..
  ${CMAKE_CURRENT_BINARY_DIR}
  CATKIN_DEPENDS roscpp rqt_gui rqt_gui_cpp
)

###########
## Build ##
###########

## set variables for Statemachine Control node
set(SRCS_CONTROLS
  src/RSMControls.cpp
)
set(HDRS_CONTROLS
  src/RSMControls.h
)
set(UIS_CONTROLS
  src/rsm_controls.ui
)

set(INC_DIR
  include
  ${CMAKE_CURRENT_BINARY_DIR}
)

##########################################################################################
# qt5_wrap_cpp produces moc files for all headers listed
# qt5_wrap_ui produces .h files for all .ui files listed

## Statemachine Control:
qt5_wrap_cpp(MOCS_SRCS_CONTROLS ${HDRS_CONTROLS})
qt5_wrap_ui(UI_HEADER_CONTROLS ...
(more)
2020-11-25 00:44:21 -0500 answered a question Prerelease melodic Qt5 cmake error

Seems like I was testing with a detached git head or something when trying to add <build_depend>qtbase5-dev</bu

2020-11-25 00:38:33 -0500 received badge  Notable Question (source)
2020-11-20 01:41:19 -0500 received badge  Popular Question (source)
2020-11-19 04:58:19 -0500 asked a question Prerelease melodic Qt5 cmake error

Prerelease melodic Qt5 cmake error Hey, I am currently trying to do my prerelease tests for a melodic version of my meta

2020-08-31 03:34:28 -0500 received badge  Famous Question (source)
2020-08-20 07:50:25 -0500 received badge  Self-Learner (source)
2020-08-20 06:19:40 -0500 commented question Global planner makes robot drive in circles along U shaped path

Sorry for the late response, I was busy with some other more important work. I think, I've found a solution which I post

2020-08-20 06:18:18 -0500 marked best answer Global planner makes robot drive in circles along U shaped path

Hey,
I am using ROS kinetic and followed the navigation stack's tutorial on writing a global path planner. Most of the time its working great but on special occasions its behavior seems kinda odd. The global planner aims to follow a path derived from a tree built by my exploration algorithm. The path is not optimal so far but the focus lies on the robot closely following the edges connecting the tree nodes as they were cleared of 3D obstacles beforehand.

An example path calculated by the global planner can be seen in the image below (green lines show the path, purple arrows the orientation along the path's nodes, the red arrow marks the goal node and the hand-drawn red arrow shows where the robot is moving in a circular pattern. In this example the robot started from the first node on the right and then got stuck in the circle for quite some repititions until it finally (somehow) manages to reach the goal.

Global path and circular robot movement

Now my question: Is the global planner giving out paths which nodes are too far apart or might there be a problem with the orientation of said nodes? Right now all nodes along the path point towards the next node, the goal node points towards the exploration goal. Or is the actual problem the configuration of my local planner (DWA, parameters shown below)? I've played around with some of its parameters (path_distance_bias and goal_distance_bias) but this did not seem to stop the robot from driving in circles.

Thanks in advance,
Marco

Edit 2: Since I'm working on a VM and I had my issues recording the screen via video, I made a gif which you can see below. The robot is moving in circles again in another example. Or to be precise, it looks more like an outward spiral. This time you can see the tree structure (blue lines and spheres). The glboal path can still be identified by the purple arrows at the path's nodes (green line is hardly visible).

image description

Edit 3: I've changed 3 parameters and messed around with them for a bit. I think oscillation_reset_dist has no impact on this matter since the robot's behavior did not change on altering the parameter. the parameters path_distance_bias and goal_distance_bias actually led to a different behavior. The higher path_distance_bias was compared to goal_distance_bias the closer the robot followed the path up to the goal. When nearly reaching it, he made a sharp turn for the start as can be seen in the gif below ( with path_distance_bias: 50, goal_distance_bias: 10). The other way around leads to the robot just going from the start straight to the goal and turning around when nearly there.

image description
(Please ignore the red current goal marker here, it remained at the start node and was not set to the goal node. This happens sometimes)

It seems like the path is calculated anew when nearly there but I added console output to the methods and can verify ... (more)

2020-08-20 06:18:13 -0500 answered a question Global planner makes robot drive in circles along U shaped path

So, it seems I somehow fixed the problem (at least I wasn't able to observe the described behavior for a longer simulati

2020-08-04 06:55:04 -0500 commented question Global planner makes robot drive in circles along U shaped path

This seems to confirm your point. If the goal is inside the local costmap, the complete path is shown. With path_distan

2020-07-31 14:47:35 -0500 received badge  Notable Question (source)
2020-07-31 01:13:50 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-31 01:12:02 -0500 commented question Global planner makes robot drive in circles along U shaped path

@Dragonslayer: Unfortunately, I already tried the prune_plan parameter to no avail. When I set it to false, it seems to

2020-07-31 01:12:02 -0500 received badge  Commentator
2020-07-30 07:55:26 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-30 02:42:55 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-30 02:38:08 -0500 received badge  Popular Question (source)
2020-07-30 01:38:23 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-30 00:58:17 -0500 commented question Global planner makes robot drive in circles along U shaped path

@Dragonslayer: I've added a gif, since I haven't found a program able to record the screen without artifacts on my VM. A

2020-07-30 00:49:57 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-30 00:26:56 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-29 10:27:23 -0500 edited question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-07-29 10:27:23 -0500 received badge  Editor (source)
2020-07-29 10:26:42 -0500 asked a question Global planner makes robot drive in circles along U shaped path

Global planner makes robot drive in circles along U shaped path Hey, I am using ROS kinetic and followed the navigation

2020-01-06 08:38:17 -0500 received badge  Famous Question (source)
2019-10-02 03:23:12 -0500 received badge  Notable Question (source)
2019-08-05 04:31:59 -0500 received badge  Popular Question (source)
2019-08-03 07:24:09 -0500 marked best answer Running a prerelease test fails with Python ImportError

Hey everyone,

I am currently trying on publishing a ROS package and following the Realeasing A Package guide. So far I've added my package name to the rosdistro for kinetic and verified its readiness before. Unfortunately, I can't manage to execute a prerelease test. I get stuck at the 4th step of section 5.2. When I run the generated command (which is shown below), I get the following error:

The command:

mkdir -p /tmp/prerelease_job
cd /tmp/prerelease_job
generate_prerelease_script.py \
  https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml \
  kinetic default ubuntu xenial amd64 \
  robot_statemachine \
  --level 1 \
  --output-dir ./

The error output:

Traceback (most recent call last):
  File "/usr/bin/generate_prerelease_script.py", line 35, in <module>
    from ros_buildfarm.config import get_index as get_config_index
  File "/usr/lib/python3/dist-packages/ros_buildfarm/config/__init__.py", line 20, in <module>
    import yaml
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module>
    from error import *
ImportError: No module named 'error'

So far, I've tried with the first suggestion under 5.1, installing the python3-ros-buildfarm which produced the above error. Then I removed it, and installed python-ros-buildfarm, also installing the dependencies required in the second purple box under section 5.1. With this the prerelease script could be built but it produced the following error when I ran it:

prerelease.sh output with python-ros-buildfarm:

Prerelease script

By default this script will continue even if tests fail.
If you want the script to abort and return a non-zero return code
you can set the environment variable ABORT_ON_TEST_FAILURE=1.
You can also set ABORT_ON_TEST_FAILURE_UNDERLAY=1 or
ABORT_ON_TEST_FAILURE_OVERLAY=1 to only affect a specific workspace.

Use workspace: /tmp/prerelease_job


Clone source repositories for underlay workspace

+ git clone --recurse-submodules -b master https://github.com/MarcoStb1993/robot_statemachine.git ws/src/robot_statemachine
Cloning into 'ws/src/robot_statemachine'...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 936 (delta 31), reused 37 (delta 19), pack-reused 873
Receiving objects: 100% (936/936), 1.90 MiB | 587.00 KiB/s, done.
Resolving deltas: 100% (627/627), done.
Checking connectivity... done.
+ git -C ws/src/robot_statemachine --no-pager log -n 1
commit 6217fdb14c265dbf85b4688b730f8514caf30efa
Author: MarcoStb1993 <35468630+MarcoStb1993@users.noreply.github.com>
Date:   Thu Aug 1 12:05:33 2019 +0200

    Delete .project



Clone release repositories for overlay workspace

Underlay workspace contains 6 packages:
- robot_statemachine
- statemachine
- statemachine_additions
- statemachine_msgs
- statemachine_rqt_plugins
- statemachine_rviz_plugins
Overlay packages based on dependency level: 0
Overlay packages based on whitelisted package names: 0
Overlay workspace will contain 0 packages:

Traceback (most recent call last):
  File "/usr/bin/vcs", line 11, in <module>
    load_entry_point('vcstool==0.2.2', 'console_scripts', 'vcs')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources ...
(more)
2019-08-03 07:24:08 -0500 commented answer Running a prerelease test fails with Python ImportError

Thanks again for clarifying and helping me out so much! I never used virtualenv before, so wasn't quite sure what I was