ori-drs / pronto_anymal_example

Example binary running the Pronto state estimator on the ANYmal B robot
24 stars 10 forks source link

The state estimation is has huge difference compared to ground truth ? #10

Closed shivauchiha closed 3 years ago

shivauchiha commented 4 years ago

Hi the difference between the state estimation and ground truth is large . Screenshot from 2020-10-09 08-09-10

I also have this error are they related "imu_link" passed to lookupTransform argument target_frame does not exist.?

mcamurri commented 4 years ago

Dear @shivauchiha, it's hard to judge from one picture.

Can you quantify the error? What do the colored lines represent?

Keep in mind that this is an odometry system, so drift is to be expected.

shivauchiha commented 3 years ago

Hi! Thanks for the response . Here is the colour identification. green -> Ground truth Pink -> TSIF red -> fovis blue -> pronto

astumpf commented 3 years ago

Current demo setup seems to be broken. It won't run neither using master nor noetic branch as described in the readme. I'm using the repositories and branches defined in the clone_debs.bash from here (noetic branch). Note that there is no "pronto-anymal-example" branch at pronto git.

However, using the setup specified in the noetic version of clone_debs.bash (with pronto @master branch) I noticed following:

At startup this error occurs:

"imu_link" passed to lookupTransform argument target_frame does not exist.

When playback the bag file, the console is flooded with error messages:

[LegodoHandlerBase::computeVelocity] Something went wrong!

Resulting in huge drift of pronto state estimation (cyan line):

Screenshot from 2021-03-31 14-05-21

This differs significantly from the expected output given by the example here.

astumpf commented 3 years ago

For clarification of the setup, here is my current install script for a clean setup of a pronto test workspace:

source /opt/ros/melodic/setup.bash

ws_path="/home/alex/pronto_ws"

sudo apt install ros-melodic-velodyne-description

# create new catkin workspace
mkdir "${ws_path}"
mkdir "${ws_path}/src"

# init wstool
cd "${ws_path}"
wstool init .

wstool set -y --git "src/pronto"                        "https://github.com/ori-drs/pronto.git"
wstool set -y --git "src/pronto_common_utils"           "https://github.com/ori-drs/common_utils.git"
wstool set -y --git "src/pronto_biped_kinematics"       "https://github.com/ori-drs/kinematic_utils.git"
wstool set -y --git "src/pronto_anymal_example"         "https://github.com/ori-drs/pronto_anymal_example.git" -v "noetic"
wstool set -y --git "src/fovis"                         "https://github.com/ori-drs/fovis.git"
wstool set -y --git "src/fovis_ros"                     "https://github.com/ori-drs/fovis_ros.git" -v "pronto-fovis"
wstool set -y --git "src/hector_slam"                   "https://github.com/ori-drs/hector_slam.git"
wstool set -y --git "src/anymal_b_simple_description"   "https://github.com/ori-drs/anymal_b_simple_description.git" -v "add-sensors"
wstool set -y --git "src/realsense"                     "https://github.com/ori-drs/realsense.git" -v "development-fixes"

wstool update -j$(nproc)

# install system dependencies
rosdep update
rosdep install -r --from-path . --ignore-src

# build workspace
catkin build

Then, I'm starting the demo as described here.

shivauchiha commented 3 years ago

Hi @astumpf can you check if your IMU_link in the robot's URDF is named as 'imu_link' ? I actually managed to integrate pronto with ODRI's URDF thanks to @mcamurri consistent guidance. However I found to not have much improvement in terms of proper state estimation.I might have made mistakes in my implementation but as for my knowledge I have integrated everything including robcogen leg odom properly. As a result shifted to other state estimation packages . If you are using 3D lidar you may actually get over the problem without using any state estimation package with help of ALOAM . But if you really want to go with this drop a mail to mcamurri, He is very responsive to questions.

astumpf commented 3 years ago

Imu is indeed named "imu_link" in the URDF, see frames.pdf. However, this error still pops up on launch.

mcamurri commented 3 years ago

It is normal to have this error printed a couple of times at start, as the static TF from base to imu is published by the rosbag itself. So if the rosbag is not started yet, the estimator will complain.

Reading this static transform from file rather than from the ROS parameter server is not yet implemented (but should be straightforward to do)

Regarding the broken demo, it might be due to some recent changes to the pronto repository. Unfortunately we don't have a CI set up yet, but I'll try to see why this is happening.

mcamurri commented 3 years ago

Dear @astumpf , the build server is now installed and the demo correctly works on my machine with Ubuntu 20.04 and Noetic. Can you please confirm the demo now works for you?

astumpf commented 3 years ago

Important note: We are still working with Ubuntu 18.04 Melodic.

I've just tested today using the noetic branch (with ROS Melodic) as master wasn't updated recently. The install instructions are not clear as "dependencies.rosinstall" is missing the realsense pkg and the "clone_deps.bash" is referring to wrong git branches and duplicates the anymal_b_description in the workspace. So that's what I've came up with:

source /opt/ros/melodic/setup.bash

ws_path="/home/alex/pronto_ws"

if [ -d "${ws_path}" ]; then
  echo "Warning: Pronto WS does already exist. Aborting!"
  exit 1
fi

sudo apt install ros-melodic-velodyne-description

# create new catkin workspace
mkdir "${ws_path}"
mkdir "${ws_path}/src"

# init wstool
cd "${ws_path}"
wstool init .

wstool set -y --git "src/pronto"                        "https://github.com/ori-drs/pronto.git" -v "master"
wstool set -y --git "src/pronto_common_utils"           "https://github.com/ori-drs/common_utils.git" -v "master"
wstool set -y --git "src/pronto_anymal_example"         "https://github.com/ori-drs/pronto_anymal_example.git"
wstool set -y --git "src/fovis"                         "https://github.com/ori-drs/fovis.git" -v "master"
wstool set -y --git "src/fovis_ros"                     "https://github.com/ori-drs/fovis_ros.git" -v "pronto-fovis"
wstool set -y --git "src/realsense"                     "https://github.com/ori-drs/realsense.git" -v "development-fixes"

wstool update -j$(nproc)

# install system dependencies
rosdep update
rosdep install -r --from-path . --ignore-src

# build workspace
catkin build

source ${ws_path}/devel/setup.bash

Running the demo results in:

Screenshot from 2021-04-29 11-59-09

I've noticed that pronto is extremely lagging behind. Maybe a timing issue? However, the error messages I had reported disappeared.

mcamurri commented 3 years ago

Dear @astumpf , the dependencies were indeed outdated. The dependency on the realsense2 description can now be easily installed from APT. The noetic branch was also merged some time ago but the branch was not deleted.

If you could have a nother go with the branch for #13 and the usual master for pronto, that would be helpful.

I don't have a melodic machine to test the demo on, but I might be able to have a look over the weekend.

wxmerkt commented 3 years ago

This is the result running the entire log: image

Is it possible you did not compile your workspace in Release or RelWithDebInfo mode?

astumpf commented 3 years ago

Awesome! Using the dependencies-fixes branch fixes all issues. The clone_deps.sh scripts works also perfectly. I can now reproduce your results.

There is only one missing run dependencies on ros-<distro>-image-transport-plugins. I would suggest adding this to your package manifest, so rosdep can install it automatically.

Thank you very much for your efforts!

mcamurri commented 3 years ago

Thank you @astumpf for testing it. I've added the package to the branch and merge it soon.

sayali-purdue commented 1 year ago

<exec_depend>image_transport_plugins</exec_depend> dependency in package.xml is because of the inclusion of a launch file of fovis_ros package in demo.launch. Could you please describe why this run time dependency was added to the package.xml of 'pronto_anymal_b' package and not to the package.xml of 'fovis_ros' package?