Code Monkey home page Code Monkey logo

gem's People

Contributors

jessychen1016 avatar maverickpeter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gem's Issues

How to use it on my own robot

Thanks for your efforts.
I saw #7 and modified my launch file and yaml file, nothing is displayed in rviz after running.
my launch:
arg name="robot_id" default="0"/
arg name="robot_name" default="go2"/
arg name="camera_topic" default="/$(arg robot_name)/camera/depth/image_raw"/
arg name="lidar_topic" default="/$(arg robot_name)/velodyne_points"/

node pkg="elevation_mapping" type="elevation_mapping" name="elevation_mapping_$(arg robot_id)" output="screen"
rosparam command="load" file="$(find elevation_mapping_demos)/config/robots/simple_demo_robot.yaml"
rosparam command="load" file="$(find elevation_mapping_demos)/config/elevation_maps/simple_demo_map.yaml"
rosparam command="load" file="$(find elevation_mapping)/config/sensor_processors/velodyne_VLP16.yaml"
remap from="/velodyne_points" to="$(arg lidar_topic)"/>
remap from="/camera/depth/image_raw" to="$(arg camera_topic)"
node
node name="rviz" pkg="rviz" type="rviz" args="-d $(find elevation_mapping_demos)/rviz/elevation_map_visualization.rviz" /

and my yaml:
robot_id: "0"
robot_name: "go2"
map_frame_id: "/map"
sensor_frame_id: "/velodyne_base_link"
robot_base_frame_id: "/base"
track_point_frame_id: "/base"
robot_pose_cache_size: 200
robot_local_map_size: 20
track_point_x: 0.0
track_point_y: 0.0
track_point_z: 0.0
octomap_road_resolution: 0.2
octomap_obs_resolution: 0.1
map_saving_file: "./map.pcd"
submap_saving_dir: "./submaps/"
camera_params_yaml: "/home/khw/catkin_ws/src/GEM/elevation_mapping/elevation_mapping/config/sensor_processors/realsense_d435.yaml"
orthomosaic_saving_dir: "./image/"
Thank you very much for your reply

2024-04-12 15-56-53屏幕截图

simple_demo.launch: "ERROR: Wrong path to settings"

I am attempting to run simple_demo.launch as described in the README, but it fails with:

[ INFO] [1717669508.068559416]: Elevation mapping node initializing ... 
[ INFO] [1717669509.069437459]: Done.
[ WARN] [1717669509.072226345]: UPDATE GLOBAL MAP
ERROR: Wrong path to settings
[elevation_mapping_0-1] process has died [pid 270, exit code -11, cmd /catkin_ws/devel/lib/elevation_mapping/elevation_mapping /voxel_grid/output:=/robot0/pointcloud /stereo_grey/left/image_raw:=/robot0/image_rect __name:=elevation_mapping_0 __log:=/root/.ros/log/0a2013fa-23ef-11ef-a15e-0242ac110002/elevation_mapping_0-1.log].
  1. I don't think I configured any path to any settings, nor should I need to, since the example should work out of the box.
  2. The error message should give information about the path (if any) which it received, and why it is "wrong": Does the path not exist? Does the path reference a folder, rather than a file, or vice-versa? Was some other specific path expected? Was the wrong extension given? Was there a problem with the file itself, such as encoding or format? The error message "Wrong path to settings" simply doesn't give any information which a user could use to attempt to troubleshoot or resolve the issue. So this error message needs to be improved.
  3. If a path to some settings needs to be configured, then this should be documented in the README, and isn't.

Since the example is meant to serve as documentation of how to get GEM working with my robot, not being able to get it running blocks me from using GEM at all.

I am using the following Dockerfile which I wrote (the base image requires the NVIDIA Container Toolkit and its tag should be adjusted based on your host CUDA version:

FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu20.04

ARG DEBIAN_FRONTEND=noninteractive

ARG ROS_DISTRO=noetic

RUN apt-key adv \
      --keyserver "hkp://keyserver.ubuntu.com:80" \
      --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \
    echo "deb http://packages.ros.org/ros/ubuntu focal main" \
      > /etc/apt/sources.list.d/ros-latest.list && \
    apt-get update && \
    apt-get install \
      --yes \
      --no-install-recommends \
      git \
      libeigen3-dev \
      libpcl-dev \
      python3-pip \
      python3.8 \
      ros-$ROS_DISTRO-costmap-2d \
      ros-$ROS_DISTRO-eigen-conversions \
      ros-$ROS_DISTRO-grid-map \
      ros-$ROS_DISTRO-octomap-ros \
      ros-$ROS_DISTRO-pcl-ros \
      ros-$ROS_DISTRO-ros-base \
      ros-$ROS_DISTRO-rqt-gui \
      ros-$ROS_DISTRO-rqt-gui-py \
      ros-$ROS_DISTRO-rviz \
      ros-$ROS_DISTRO-tf-conversions && \
    apt-get clean && \
    mkdir -p /catkin_ws/src && \
    cd /catkin_ws/src && \
    git clone https://github.com/anybotics/kindr && \
    git clone https://github.com/ANYbotics/kindr_ros.git && \
    git clone https://github.com/ZJU-Robotics-Lab/slam_msg.git && \
    git clone https://github.com/ZJU-Robotics-Lab/GEM.git && \
    sed -i "s/++11/++14/g" GEM/layers/CMakeLists.txt && \
    cd /catkin_ws && \
    . /opt/ros/$ROS_DISTRO/setup.sh && \
    catkin_make # https://github.com/ZJU-Robotics-Lab/GEM/issues/2

RUN echo "source /opt/ros/noetic/setup.bash" >> /etc/bash.bashrc && \
    echo "source /catkin_ws/devel/setup.bash" >> /etc/bash.bashrc

... and I made the following shell script to attempt to run the simple_demo.launch, which assumes that:

  1. You have named your image 'gem'.
  2. test.bag exists in the current working directory.
#!/bin/bash

containerID=$(docker create \
                --env="DISPLAY" \
                --env="QT_X11_NO_MITSHM=1" \
                --tty \
                --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
                --volume="./test.bag:/test.bag" \
                gem)

echo "container ID: $containerID"

hostname=$(docker inspect --format='{{ .Config.Hostname }}' $containerID)

echo "hostname: $hostname"

xhost +local:$hostname

xhost

docker start $containerID

source_ros="source /opt/ros/noetic/setup.bash; "`
          `"source /catkin_ws/devel/setup.bash; "

docker exec --detach $containerID /bin/bash -c \
  "$source_ros"`
  `"sleep 6s; "`
  `"rosbag play test.bag --clock"

docker exec --detach $containerID /bin/bash -c \
  "$source_ros"`
  `"roslaunch /catkin_ws/src/GEM/filter.launch"

sleep 3s

docker exec --interactive --tty $containerID /bin/bash -c \
  "$source_ros"`
  `"roslaunch elevation_mapping_demos simple_demo.launch"

docker stop $containerID

docker rm $containerID

xhost -local:$hostname

The full output of the final docker exec command is:

WARNING: Package name "pointMap_layer" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
started roslaunch server http://970b14a6b0a8:45143/

SUMMARY
========

PARAMETERS
 * /elevation_mapping_0/camera_params_yaml: /home/mav-lab/Pro...
 * /elevation_mapping_0/length_in_x: 12.0
 * /elevation_mapping_0/length_in_y: 12.0
 * /elevation_mapping_0/mahalanobis_distance_threshold: 2.5
 * /elevation_mapping_0/map_frame_id: /robot0/map
 * /elevation_mapping_0/map_saving_file: ./map.pcd
 * /elevation_mapping_0/max_variance: 10000.0
 * /elevation_mapping_0/min_variance: 0.0001
 * /elevation_mapping_0/multi_height_noise: 2e-05
 * /elevation_mapping_0/octomap_obs_resolution: 0.1
 * /elevation_mapping_0/octomap_road_resolution: 0.2
 * /elevation_mapping_0/orthomosaic_saving_dir: ./image/
 * /elevation_mapping_0/position_x: 0.0
 * /elevation_mapping_0/position_y: 0.0
 * /elevation_mapping_0/resolution: 0.1
 * /elevation_mapping_0/robot_base_frame_id: /PandarQT
 * /elevation_mapping_0/robot_id: 0
 * /elevation_mapping_0/robot_local_map_size: 20
 * /elevation_mapping_0/robot_name: robot0
 * /elevation_mapping_0/robot_pose_cache_size: 200
 * /elevation_mapping_0/sensor_frame_id: /PandarQT
 * /elevation_mapping_0/sensor_processor/beam_angle: 0.0006
 * /elevation_mapping_0/sensor_processor/beam_constant: 0.0015
 * /elevation_mapping_0/sensor_processor/ignore_points_above: 0.8
 * /elevation_mapping_0/sensor_processor/ignore_points_below: -5.0
 * /elevation_mapping_0/sensor_processor/min_radius: 0.018
 * /elevation_mapping_0/sensor_processor/type: laser
 * /elevation_mapping_0/submap_saving_dir: ./submaps/
 * /elevation_mapping_0/track_point_frame_id: /PandarQT
 * /elevation_mapping_0/track_point_x: 0.0
 * /elevation_mapping_0/track_point_y: 0.0
 * /elevation_mapping_0/track_point_z: 0.0
 * /elevation_mapping_0/travers_threshold: 0.8
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    elevation_mapping_0 (elevation_mapping/elevation_mapping)
    rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

WARNING: Package name "pointMap_layer" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[elevation_mapping_0-1]: started with pid [270]
process[rviz-2]: started with pid [271]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[ INFO] [1717669507.870478214]: get robot_id: 0
[ INFO] [1717669507.870892721]: get robot_name: robot0
[ INFO] [1717669507.870904523]: Check Format
[ INFO] [1717669507.870909067]: Check Format Done
[ INFO] [1717669507.874251704]: Elevation mapping node started.
[ INFO] [1717669507.875472576]: Elevation mapping node parameters loading ... 
libGL error: MESA-LOADER: failed to retrieve device information
[intel_init_bufmgr:1027] Error initializing buffer manager.
libGL error: failed to create dri screen
libGL error: failed to load driver: i915
libGL error: failed to open /dev/dri/card0: No such file or directory
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to retrieve device information
[intel_init_bufmgr:1027] Error initializing buffer manager.
libGL error: failed to create dri screen
libGL error: failed to load driver: i915
libGL error: failed to open /dev/dri/card0: No such file or directory
libGL error: failed to load driver: iris
GPU Init mapping:14400
[ INFO] [1717669508.068559416]: Elevation mapping node initializing ... 
[ INFO] [1717669509.069437459]: Done.
[ WARN] [1717669509.072226345]: UPDATE GLOBAL MAP
ERROR: Wrong path to settings
[elevation_mapping_0-1] process has died [pid 270, exit code -11, cmd /catkin_ws/devel/lib/elevation_mapping/elevation_mapping /voxel_grid/output:=/robot0/pointcloud /stereo_grey/left/image_raw:=/robot0/image_rect __name:=elevation_mapping_0 __log:=/root/.ros/log/0a2013fa-23ef-11ef-a15e-0242ac110002/elevation_mapping_0-1.log].

I don't think the libGL errors are related. rviz still works despite them and does show the trajectory, but not the elevation map, of course.

the question about costmap !!

i run the code about create_globalmap.launch file and the read the code .but i have two questions about it .
1.elevationMap_layer.cpp bool is_obstacle = (data(gindex(0), gindex(1)) <0.7); the value in the data is elevation ? what is the value and index the correspondence relationship ? and index[0],index[1] corresponding what ?
2. why the data is <0.7 ? the high value of elevation should obstacles?

高程图没有显示

我在运行simple_demo的时候发现高程图没有输出,请问该如何解决这个问题
Screenshot from 2024-05-24 15-30-51
Screenshot from 2024-05-24 15-30-55
Screenshot from 2024-05-24 15-31-41

how to make the package run successfully

Hi,
In ETH package,usr needs to provide pointcloud(input source file) and pose,But in this package,I want to know the node (elevation_mapping_0) is subscribe lidar pointcloud and pose?
I modifly the config file,rviz is nothing,can you give me some suggestions?
Thanks!

Error generating

In file included from /usr/local/cuda-10.1/include/cuda_runtime.h:115:0,
from :0:
/usr/local/cuda-10.1/include/crt/common_functions.h:74:24: error: token ""CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead."" is not valid in preprocessor expressions
#define CUDACC_VER "CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead."
^
/usr/include/eigen3/Eigen/src/Core/util/Macros.h:364:33: note: in expansion of macro ‘CUDACC_VER
#if defined(CUDACC_VER) && CUDACC_VER >= 70500 && __cplusplus > 199711L

I got this error when catkin_make, please help.
Thx

Distortions in visual_map outputs

Hi,
I see distortions in /visual_map outputs when the robot's position and orientation values ​​change instantly. The first image below shows the state of the robot before it goes up to the step, and the second shows the state after it goes up to the step.

image

image

I think there are two different reasons for this situation:

  • Calibration
  • Synchronization

Do you have any suggestions to prevent or reduce this situation?

About using KITTI data

Thank you for your sharing!

I try to use KITTI sequence 05 data for testing with lidar+camera version, however, the results is strange.
I saw you said the demo you provided was recorded with PandarQT with x axis point to left and y axis point to back. Does it need to change the axis of the data, or just modify somewhere in the code?
Thank you very much!

about costmap

Thank you for your great work!
I tried with the simple demo in the newest version with "roslaunch pointMap_layer create_globalmap.launch", but it seems that the topic about costmap ( /move_base/global_costmap/costmap and /move_base/local_costmap/costmap) haven't published.
I was wondering whether I missed something.
Thanks!

the question in the elevationmapping.cpp file about Local mapping?

1.how can we set the newKeyframeSignal ? the topic of new_keyframe do not publish in the test.bag. do you have any idea about set the topic about it or any tips ?
2.in the function ElevationMapping::updateLocalMap(), the phase of // Local mapping//,it get the values of "elevation " and "traver",the it make judge so long in the following and i do not understand it.can you help me?why make this if condition ?
if(((position.x() < (current_x - length_ * resolution_ / 2) || position.y() < (current_y - length_ * resolution_ / 2 )) && (delta_x > 0 && delta_y > 0))
|| ((position.x() > (current_x + length_ * resolution_ / 2 ) || position.y() > (current_y + length_ * resolution_ / 2 )) && (delta_x < 0 && delta_y < 0))
|| ((position.x() < (current_x - length_ * resolution_ / 2 ) || position.y() > (current_y + length_ * resolution_ / 2 )) && (delta_x > 0 && delta_y < 0))
|| ((position.x() > (current_x + length_ * resolution_ / 2 ) || position.y() < (current_y - length_ * resolution_ / 2 )) && (delta_x < 0 && delta_y > 0))
|| ((position.x() < (current_x - length_ * resolution_ / 2 )) && (delta_x > 0 && delta_y == 0))
|| ((position.x() > (current_x + length_ * resolution_ / 2 )) && (delta_x < 0 && delta_y == 0))
|| ((position.y() < (current_y - length_ * resolution_ / 2 )) && (delta_y > 0 && delta_x == 0))
|| ((position.y() > (current_y + length_ * resolution_ / 2 )) && (delta_y < 0 && delta_x == 0)))

input/output setting

Hello,
Thank you for sharing such a great with the community.

I would like to employ this work in my project. I advertise point clouds with type PointCloud2. I want to get elevation map to be advertised using this point clouds data. I cannot figure which parameter corresponds which data. I also have my robot and fixed map frame and their conversion. Could you explain which parameters I should edit?
I saw #7 but there is no explanation.

Thank you in advance.

Questions about the visualization

Hi! Thank you for your good work.

I built this project, but the visualization may have some problems for my computer. I use your provided test.bag, but I only get odometry results. The point clouds didn't have any visualization. The rviz received the pcd message, but it can't output it.

2021-12-01 16-08-19 的屏幕截图

Could you please tell me how to fix this bug?
I use Ubuntu 20.04 with ROS noetic.

About Stereo-only version

Thanks for your work! I'm wondering if you will release stereo-only version? It is supported in ETH package, where distance sensors(including stereo camera) and odometry are needed as the input.

About using only lidar to do the GEM

Thanks for your work, it is amazing!

I noticed that in the README.md, the Subscribed Topics includes :
/points (sensor_msgs/PointCloud2)
The distance measurements. Modify it in launch/simple_demo.launch
/tf (tf/tfMessage)
The transformation tree.

I also read your paper, I was wondering that how to use lidar ( such as in your YQ data set example) to do the GEM, since I noticed that you subscribed the camera topic in your codes. Has the code using only lidar been not released yet?

Thank you!

Out of range error with structured light sensor processor

Hi,
I tried to launch GEM on RGB-D input with structured light sensor processor and faced with "out of range" error:
Снимок экрана от 2021-12-27 16-20-06
My sensor processor config is as follows:

sensor_processor/type: structured_light
sensor_processor/cutoff_min_depth: 0.2
sensor_processor/cutoff_max_depth: 3.25
sensor_processor/normal_factor_a: 0.000611
sensor_processor/normal_factor_b:  0.003587
sensor_processor/normal_factor_c: 0.3515
sensor_processor/normal_factor_d: 0
sensor_processor/normal_factor_e: 1
sensor_processor/lateral_factor: 0.01576

Analyzing the code, I have found the reason for this error. It occurs because readcomputerparam function of SensorProcessorBase class takes params such as min_radius, beam_constant, and beam_angle (seem like params related to laser sensors only).
Снимок экрана от 2021-12-27 16-33-12

However, readParameters functions in SensorProcessorBase class and StructuredLightSensorProcessor class do not read these parameters.
Снимок экрана от 2021-12-27 16-43-39

Снимок экрана от 2021-12-27 16-34-30

Could you say, what is the best way to fix this bug and run GEM on RGB-D input data?

the nodeHandle_.param("camera_params_yaml", cameraParamsFile, string("/home/mav-lab/intrinsic.yaml"));

can you give me the yaml file ? i run the code but in the terminal make the mistakes.
ERROR: Wrong path to settings
[elevation_mapping_0-2] process has died [pid 5692, exit code -11, cmd /home/lwl/GEM-map/devel/lib/elevation_mapping/elevation_mapping /voxel_grid/output:=/robot0/pointcloud /stereo_grey/left/image_raw:=/robot0/image_rect __name:=elevation_mapping_0 __log:=/home/lwl/.ros/log/6eb9a3cc-4f61-11ec-8e95-00d86184c4c3/elevation_mapping_0-2.log].
log file: /home/lwl/.ros/log/6eb9a3cc-4f61-11ec-8e95-00d86184c4c3/elevation_mapping_0-2*.log

只有机器人周围有地图

非常感谢你的工作!但我在运行simple demo的时候,发现只有机器人周围有建图,随着机器人移动,历史图像会消失,想请问我是哪一步出了问题,十分感谢!

about save map

Thank you very much for the code you provided. I have a question to ask you. How to save the global elevation map?

fatal error: dislam_msgs/SubMap.h: No such file or directory

Hi, thanks for your amazing work!
I have the following issue when l use "catkin_make":
include/elevation_mapping/ElevationMapping.hpp:21:10: fatal error: dislam_msgs/SubMap.h: No such file or directory
#include "dislam_msgs/SubMap.h"
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In the workspace,I didn't find SubMap.h. So,I really appreciate your help.

get stuck in th composingGlobalMap

@MaverickPeter hello, I tried to test the main branch with test.bag on lidar+camera, but it seems that it gets stuck in the composingGlobalMap function, with globalMap_.size()=0.
WechatIMG1
Besides, I looked into the code, I was wondering where are the "denseSignal" and "map saving Signal" published.
Could you give me some guide to deal with this issue?

Last but not least, looking forward to the merged version for both lidar-only and camera+lidar.

Thank you very much.

Originally posted by @TT22TY in #3 (comment)

Question about elevation layer

Hello,
When I run simple_demo.launch, I cannot get elevation layer;
And the elevation values that I print below"Map_feature()" are NAN;
Thanks for your help!

Screenshot from 2023-05-17 18-23-57
Screenshot from 2023-05-17 18-26-04
Thank for your help.
Screenshot from 2023-05-17 18-40-07
Screenshot from 2023-05-18 09-47-56

How to use this process?

Thanks for your efforts.
When I finished configuring its dependencies,I found that I could not use the realsense-d435i to run this code.Can you tell me how to use it?How to modify the configuration file?Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.