Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trajectory with spurious points in rviz #32

Open
BBO-repo opened this issue Aug 16, 2024 · 2 comments
Open

trajectory with spurious points in rviz #32

BBO-repo opened this issue Aug 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@BBO-repo
Copy link

BBO-repo commented Aug 16, 2024

Environment

Use a Dockerfile with: FROM osrf/ros:jazzy-desktop-full
Then docker guest environment is:

# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble

But host environment is:

$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
  • Source or binary build?

Source obtained with a git clone https://github.com/gazebosim/ros_gz_project_template.git commit ID 043a0ba

Description

  • Expected behavior: Smooth trajectory in RVIZ2
  • Actual behavior: Trajectory in RVIZ2 present spurious as illustrated in the joined video
    issue-rviz-gazebo-trajectory.webm

Steps to reproduce

  1. Use this Dockerfile to build your container
FROM osrf/ros:jazzy-desktop-full

WORKDIR /workspace

RUN apt update && apt -y dist-upgrade && apt install -y \
  nano git wget software-properties-common \
  ros-jazzy-ros2-control ros-jazzy-ros2-controllers \
  ros-jazzy-gz-ros2-control ros-jazzy-ros-gz \
  ros-jazzy-ackermann-msgs ros-jazzy-geometry2 \
  ros-jazzy-joint-state-publisher-gui ros-jazzy-imu-tools \
  ros-jazzy-robot-localization ros-jazzy-geographic-msgs \
  && rm -rf /var/lib/apt/lists/*

RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
  1. mkdir -p /workspace/ros2_workspace/src/
  2. cd /workspace/ros2_workspace/src/
  3. git clone https://github.com/gazebosim/ros_gz_project_template.git
  4. cd /workspace/ros2_workspace
  5. export GZ_VERSION=harmonic && colcon build --symlink-install
  6. source install/setup.bash
  7. ros2 launch ros_gz_example_bringup diff_drive.launch.py and in another terminal gz topic -t "/model/diff_drive/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}"

Output

Trajectory in RVIZ2 present spurious as illustrated in the joined video

@BBO-repo BBO-repo added the bug Something isn't working label Aug 16, 2024
@BBO-repo
Copy link
Author

Hi,
I was wondering if there were any news regarding my issue?
I've tried a fresh install of gazebo harmonic and ros2 jazzy on ubuntu noble but still produce the issue.
I've also asked the question on stackoverflow https://robotics.stackexchange.com/questions/112758/gazebo-harmonic-ros2-jazzy-trajectory-with-spurious-points-in-rviz

@BBO-repo
Copy link
Author

The issue seems to come from this plugin

      <plugin
        filename="gz-sim-odometry-publisher-system"
        name="gz::sim::systems::OdometryPublisher">
        <odom_frame>diff_drive/odom</odom_frame>
        <robot_base_frame>diff_drive</robot_base_frame>
      </plugin>

Ploting the trajectory with a gz topic -e -t /model/diff_drive/odometry > trajectory.txt I got those spurious points in the trajectory
spurious-trajectory

While disabling the gz-sim-odometry-publisher-system in the ros_gz_project_template/ros_gz_example_gazebo/worlds/diff_drive.sdf I got a clean trajectory

trajectory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant