aerostack2 / aerostack2

Aerostack2 is a ROS 2 framework developed to create autonomous multi-aerial-robots systems in an easy and powerful way.
https://aerostack2.github.io/
BSD 3-Clause "New" or "Revised" License
150 stars 31 forks source link

[as2_platform_multirotor_simulator] Localization goes to infinite when launching the platform #497

Closed fjanguita closed 4 months ago

fjanguita commented 6 months ago

ROS2 Version

humble

Version

main

Installation

source

What happened?

When launching the platform, drone speed sets to -9.81 in the Z axis and the drone position in the Z axis goes to a very large value, which is read as infinite by the 'project_as2_multirotor_simulator' nodes. I'm only getting this error when aerostack is compiled in release mode. For debug mode, this does not happen.

How to reproduce your issue?

Just followed source installation instructions and cloned and launched 'project_as2_multirotor_simulator'

Relevant log output

keikei@ubuntukk:~$ ros2 topic echo -l 0 --once /drone0/ground_truth/pose 
header:
  stamp:
    sec: 1715682051
    nanosec: 882801453
  frame_id: '...'
pose:
  position:
    x: 1.0
    y: 1.0
    z: 2.3434521387434647e+232
  orientation:
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0
---

keikei@ubuntukk:~$ ros2 topic echo /drone0/sensor_measurements/odom -l 0 --once
header:
  stamp:
    sec: 1715682004
    nanosec: 452869092
  frame_id: '...'
child_frame_id: '...'
pose:
  pose:
    position:
      x: 0.0
      y: 0.0
      z: -7469.305322912383
    orientation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
  covariance:
  - '...'
twist:
  twist:
    linear:
      x: 0.0
      y: 0.0
      z: -9.79198471821388
    angular:
      x: 0.0
      y: 0.0
      z: 0.0
  covariance:
  - '...'
---
RPS98 commented 6 months ago

Hi @keikei014,

I will look into it. Meanwhile, you can make it work building in Debug mode (you can use aerostack2 cli: as2 build -d)