Ask Your Question

teonik's profile - activity

2021-09-30 09:55:24 -0500 commented question is there a standalone steering package for car-like robot?

Nah, that one is for creating a steering command when the desired speed and rotation are calculated. What I need is an a

2021-09-21 15:13:37 -0500 asked a question is there a standalone steering package for car-like robot?

is there a standalone steering package for car-like robot? tl;dr is there a ready ROS\third-party package that takes in

2020-11-07 14:11:42 -0500 received badge  Stellar Question (source)
2019-04-08 01:17:41 -0500 marked best answer costmap_2d: how to publish local costmap to topic

I'm running costmap_2d with PointCloud2 feed from a 3D lidar as the only source. Lidar points are preliminary filtered, the ground is mostly segmented out. It is used as a singular source for the singular plugin of type ObstacleLayer.

As I'm using the output occupancy grid for use with home-made custom code, I would like to have a small portion of costmap near the robot position be published after every update as OccupancyGrid. I guess this is what local_costmap settings can be used for, right?

Well, false. The setup works the same way with and without additional YAML file for the local costmap. Even worse, I cannot get the full costmap to be published every step. The /costmap/costmap topic is being published once at the start, all the rest time only costmap/costmap_update are published. This is happening despite always_send_full_costmap: true in the config.

What and where should I write to get instant local occupancy grid published?

Below are my two YAML files and the portion in the launchfile where I run the costmapping node. I'm working in Xubuntu 16.04, ROS Kinetic.

in the launchfile:

<node name="costmap_node" pkg="costmap_2d" type="costmap_2d_node" output="screen" clear_params="true">
      <rosparam file="$(find lidar_proc)/params/costmap/costmap_common_voxel_params.yaml" command="load" ns="costmap" />
<rosparam file="$(find lidar_proc)/params/costmap/local_costmap_quan_params.yaml" command="load" ns="costmap" />
          <remap from="/cloud_in" to="/lidar/flt_out_cloud"/>
    </node>

costmap_common_voxel_params.yaml:

transform_tolerance: 0.5,
robot_base_frame: base_link,

width: 200,
height: 200,
origin_x: -150,
origin_y: -50,

resolution: 0.2,
footprint:
- [-11.2, -3.2]
- [-11.2, 3.2]
- [0.2, 3.2]
- [0.2, -3.2],
update_frequency: 10.0,
static_map: false,
publish_frequency: 10.0,
max_obstacle_height:  3.0,
min_obstacle_height:  -2, 
obstacle_range: 70.0,
raytrace_range: 70.0,
always_send_full_costmap: true,

plugins:
    - {name: obstacles,          type: "costmap_2d::VoxelLayer"}

obstacles: {
  z_resolution: 0.2,
  z_voxels: 15,
  origin_z: -2.0,
  publish_voxel_map: true,
  mark_threshold: 0.5,
  enabled: true,
  max_obstacle_height:  3.0,
  min_obstacle_height:  -2,
  obstacle_range: 70.0,
  raytrace_range: 70.0,
  inflation_radius: 0.0,
  combination_method: 1,
  observation_sources: lidar_obstacles,
  lidar_obstacles: {
       sensor_frame: /Sensor,
       data_type: PointCloud2,
       topic: /cloud_in,
       expected_update_rate: 5.0,
       observation_persistence: 0.0,
       max_obstacle_height:  3.0,
       min_obstacle_height:  -2,
       marking: true,
       clearing: false,
       raytrace_range: 70.0,
       obstacle_range: 70.0}
  }

local_costmap_quan_params.yaml:

local_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  static_map: false
  rolling_window: true
  resolution: 0.2
  transform_tolerance: 0.5
  width: 20
  height: 20
  always_send_full_costmap: true,
  plugins:
    - {name: obstacles,      type: "costmap_2d::ObstacleLayer"}
2019-03-01 12:35:28 -0500 marked best answer costmap_2d marking threshold

I'm running costmap_2d with PointCloud2 feed from a 3D lidar as the only source. Lidar points are preliminary filtered, the ground is mostly segmented out.

It works fine with both ObstacleLayer and VoxelLayer, marking and clearing. The problem is: I want to set the marking threshold, so that a single lidar point does not immediately mark the cell as occupied. Ideally, I want the lidar observations to have some short but finite lifetime, and the cells to be marked only if they accumulate, say, 5 points at a single moment of time. And here the troubles begin.

1) as I understood, the mark_threshold parameter only works for voxel layer. Is that right? If yes, why? it makes the same perfect sense for 2d occupancy grid.

2) for the voxel layer I managed to employ the mark_threshold, but setting it to anything greater than 0.5 makes the costmap not marking anything, save for a few cells.

There is no clear and concise explanation of how this thresholding works for filling in the occupancy grid, and the documentation even contradicts itself on some occasions. Workable configs provided by people in questions puzzle me (like, mark_threshold:9 ?).

Could anyone please explain how do I achieve desired behaviour? The YAML config and launch file are below.

Xubuntu 16.04, ROS Kinetic.

in the launchfile:

<node name="costmap_node" pkg="costmap_2d" type="costmap_2d_node" output="screen" clear_params="true">
      <rosparam file="$(find lidar_proc)/params/costmap/costmap_common_voxel_params.yaml" command="load" ns="costmap" />
      <remap from="/cloud_in" to="/lidar/flt_out_cloud"/>
    </node>

costmap_common_voxel_params.yaml:

transform_tolerance: 0.5,
robot_base_frame: base_link,

width: 200,
height: 200,
origin_x: -150,
origin_y: -50,

resolution: 0.2,
footprint:
- [-11.2, -3.2]
- [-11.2, 3.2]
- [0.2, 3.2]
- [0.2, -3.2],
update_frequency: 10.0,
static_map: false,
publish_frequency: 10.0,
max_obstacle_height:  3.0,
min_obstacle_height:  -2, 
obstacle_range: 70.0,
raytrace_range: 70.0,
always_send_full_costmap: true,

plugins:
    - {name: obstacles,          type: "costmap_2d::VoxelLayer"}

obstacles: {
  z_resolution: 0.2,
  z_voxels: 15,
  origin_z: -2.0,
  publish_voxel_map: true,
  mark_threshold: 0.5,
  enabled: true,
  max_obstacle_height:  3.0,
  min_obstacle_height:  -2,
  obstacle_range: 70.0,
  raytrace_range: 70.0,
  inflation_radius: 0.0,
  combination_method: 1,
  observation_sources: lidar_obstacles,
  lidar_obstacles: {
       sensor_frame: /Sensor,
       data_type: PointCloud2,
       topic: /cloud_in,
       expected_update_rate: 5.0,
       observation_persistence: 0.0,
       max_obstacle_height:  3.0,
       min_obstacle_height:  -2,
       marking: true,
       clearing: false,
       raytrace_range: 70.0,
       obstacle_range: 70.0}
  }
2018-11-20 12:54:43 -0500 received badge  Notable Question (source)
2018-08-14 03:45:02 -0500 received badge  Famous Question (source)
2018-07-11 07:48:21 -0500 marked best answer robot_localization: enhance local positioning with IMU

I'm testing sensor fusion with robot_localization package.

I've got a small wheeled robot with an xSense IMU and a quasi-UWB local positioning system.

The local positioning consists of two mounted ultrasonic beacons, each is separately localized against several static beacons spread around the room. The system is rather precise: manufacturer reports 2 cm standard deviation, and it's believable. But the update rate is low (around 1 Hz), and the beacons report only position, no orientation.

As the robot moves on the flat floor, I use relative position of two beacons to calculate robot position and 2D yaw (dumb middle point for position, dumb relative vector for orientation). The result is accurate, except for the position jumps between updates, and remarkable yaw jitter.

I try to use IMU data and robot_localization to provide smooth pose estimation between updates. As for now, my setup is as follows:

  • from the beacons' data I construct a PoseWithCovarianceStamped message. I do not have reported covariances, so I construct covariance matrix simply setting diagonal elements for X,Y,Z, and Z rotation as squared standard deviation (e.g. if x deviation of beacons is 0.02 m, I set covariance[0] to 0.0004). Frame_id is set to ‘map’ in the message.

  • The IMU sends out standard sensor_msgs/imu message, the only issue is that I have to remove the first '/' from its frame_id, as the ekf node sends out warnings. I've got a separate correction node for this. Also a static transform from base_link to IMU data frame_id is published.

  • ekf node 1 with world_frame set to map, inputs are IMU data and pose calculated from beacons

  • ekf node 2 with world_frame set to odom, IMU as the only input

  • constructed pose and output of odometry/filtered are visualized by rviz

Everything is up and running, but the result is far from desired. Filtered odometry follows the constructed pose closely: after each position jump (=update) the filtered pose drifts slowly towards new position for half a second, then jumps to new position altogether.

Questions:

1) Could anyone hint me about what parameters I should try to tweak to achieve smooth continuous movement of filtered pose?

2) Is there a ROS functionality to calculate robot pose from position of two mounted beacons? Say, I write static tf transforms from base_link to the two beacons' hardpoints, and ROS calculates the robot position/orientation for me, possibly with some cool Kalman magic? Then, of course, feeds it into the EKF node.

Below are the YAML parameter files for my EKF nodes. Note that I use 2d mode for both, but turning it off doesn't change the situation much.

IMU-only node:

frequency: 100

sensor_timeout: 0.1

two_d_mode: true

transform_time_offset: 0.0

transform_timeout: 0.0

print_diagnostics: true

debug: false

debug_out_file: /path/to/debug/file.txt
publish_tf: true

publish_acceleration: false

map_frame: map              # Defaults to "map" if unspecified
odom_frame: odom            # Defaults to "odom" if unspecified
base_link_frame: base_link  # Defaults to "base_link" if unspecified
world_frame: odom           # Defaults to the ...
(more)
2018-07-11 07:48:21 -0500 received badge  Scholar (source)
2018-07-11 04:16:51 -0500 received badge  Popular Question (source)
2018-07-10 10:35:42 -0500 asked a question ethzasl elevation_mapping behaviour

ethzasl elevation_mapping behaviour I am using ethzasl elevation_mapping to build a height map from lidar pointclouds. W

2018-05-07 07:46:55 -0500 received badge  Famous Question (source)
2018-03-27 10:44:49 -0500 received badge  Notable Question (source)
2018-03-27 10:44:49 -0500 received badge  Popular Question (source)
2018-03-18 03:52:59 -0500 received badge  Notable Question (source)
2018-02-20 15:28:24 -0500 received badge  Self-Learner (source)
2018-02-20 15:28:24 -0500 received badge  Teacher (source)
2018-02-20 15:27:17 -0500 received badge  Popular Question (source)
2018-02-09 07:27:15 -0500 answered a question costmap_2d marking threshold

I guess we figured out the mechanics, and, to my opinion, it's not very intuitive. After voxel marking occurs, the mark

2018-02-07 17:48:28 -0500 asked a question costmap_2d: how to publish local costmap to topic

costmap_2d: how to publish local costmap to topic I'm running costmap_2d with PointCloud2 feed from a 3D lidar as the on

2018-02-07 12:17:09 -0500 asked a question costmap_2d marking threshold

costmap_2d marking threshold I'm running costmap_2d with PointCloud2 feed from a 3D lidar as the only source. Lidar poin

2017-11-15 09:15:44 -0500 received badge  Favorite Question (source)
2017-11-15 04:01:20 -0500 received badge  Famous Question (source)
2017-10-05 09:00:15 -0500 received badge  Enthusiast
2017-10-04 08:13:17 -0500 received badge  Notable Question (source)
2017-09-27 12:16:03 -0500 received badge  Popular Question (source)
2017-09-27 05:54:13 -0500 received badge  Supporter (source)
2017-09-26 15:50:14 -0500 received badge  Nice Question (source)
2017-09-26 14:51:15 -0500 received badge  Student (source)
2017-09-26 10:15:19 -0500 edited question robot_localization: enhance local positioning with IMU

robot_localization: enhance local positioning with IMU I'm testing sensor fusion with robot_localization package. I've

2017-09-26 10:12:18 -0500 asked a question robot_localization: enhance local positioning with IMU

robot_localization: enhance local positioning with IMU I'm testing sensor fusion with robot_localization package. I've