Open JoepLinssen opened 6 years ago
Hi, thanks for the reply!
I failed to mention in my original post that the error arose after a system update which included a ros-kinetic update.
Gazebo 9 does not work for me either; here the timestamp of the /odom
topic is always 0 sec 0 nsec. The spawn_model routine now returns an error:
rosrun gazebo_ros spawn_model -urdf -param robot_description -model bugtest
SpawnModel script started
[INFO] [1536671997.663455, 0.000000]: Loading model XML from ros parameter
[INFO] [1536671997.666173, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1536671997.672709, 0.000000]: Calling service /gazebo/spawn_urdf_model
Service call failed: service [/gazebo/spawn_urdf_model] responded with an error: Time is out of dual 32-bit range
Regarding the population of the odom message; I found the line of code as well. Since it did not change recently I think that line is more a symptom than a cause of the issue.
I have not been able to discover the source of the error by myself the past day - did you have any luck reproducing it?
P.S. pressed enter at the wrong time, apologies for the clutter on the issue.
Unfortunately I won't have time to look into this any time soon. If you're willing, I'd suggest you try putting some print statements on the relevant lines to narrow down where the error could be coming from. Is clock wrong? Is now
wrong? Is the plugin doing something wrong? Has something changed upstream which is causing this...?
So.. I installed this repo from source, branch kinetic-devel
, (instead of from apt) and I no longer experience the issue. Setup was as follows:
Have environment setup B as explained in my original post.
sudo apt remove ros-kinetic-gazebo8-*
- make a catkin workspace with this repo cloned in the
src
dir (following this tut, branchkinetic-devel
)- the
rosdep check
yields missing dependencies ongazebo7
andlibgazebo7-dev
-- however, I want it compiled againstgazebo8
so I ignored the missing deps. (The environment setup explained here ensures I have the right packages installed; like `libgazebo8-dev' etc)- build the ws and source the
setup.bash
Now redo the test in the original post and the /odom/header
actually provides the correct timestamps.
I wouldn't consider this issue fixed, but at least I have a working configuration now; and since I really do not have time to investigate further, I will leave it at this.
Over the past few days I've been facing the same problem, but I found a solution today.
What I was trying was basically to run ROS Kinetic + Gazebo 9.
My setup:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
$ sudo dpkg -l| grep gazebo
ii gazebo9 9.4.1-1~xenial
ii gazebo9-common 9.4.1-1~xenial
ii gazebo9-plugin-base 9.4.1-1~xenial
ii libgazebo9:amd64 9.4.1-1~xenial
ii libgazebo9-dev:amd64 9.4.1-1~xenial
ii ros-kinetic-gazebo9-dev 2.5.15-0xenial
ii ros-kinetic-gazebo9-msgs 2.5.15-0xenial
ii ros-kinetic-gazebo9-plugins 2.5.15-0xenial
ii ros-kinetic-gazebo9-ros 2.5.15-0xenial
ii ros-kinetic-gazebo9-ros-control 2.5.15-0xenial
ii ros-kinetic-gazebo9-ros-pkgs 2.5.15-0xenial
My errors were only with /gazebo/spawn_urdf_model and /gazebo/delete_model services, as far I could see. The :
The service rosservice call /gazebo/get_world_properties "{}"
worked without any problem.
After looking http://gazebosim.org/tutorials?tut=ros_installing&cat=connect_ros I saw the message:
Kinetic is using the gazebo 7.x series, start by installing it:
Since I'm running gazebo9, I think this was a good clue. Although I'm using ros kinetic
, I've just cloned gazebo_ros
repository and compiled the melodic-devel
branch, because I suppose it's prepared for gazebo9. After that, the problem has gone. The process was basically the following:
cd ~/catkin_ws/src
git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b melodic-devel
cd ~/catkin_ws
catkin_make --only-pkg-with-deps gazebo_ros
source ~/catkin_ws/devel/setup.bash
After this, I've tried to call the services /gazebo/spawn_urdf_model and /gazebo/delete_model and the errors didn't appear anymore.
I've also confirmed that the gzserver
process was now using /home/user/catkin_ws/devel/lib/libgazebo_ros_api_plugin.so instead of /opt/ros/kinetic/lib/libgazebo_ros_api_plugin.so
PS: The last commit when I compiled the gazebo_ros was:
~/catkin_ws/src/gazebo_ros_pkgs$ git log | head
commit 2e0d83597b390d43e559d1ad21a5eb56c20d98ad
Author: Paul Bovbel <paul@bovbel.com>
Date: Wed Sep 12 12:18:42 2018 -0400
Lower minimum cmake version (#817)
Hi all,
I hope this is the right place for this issue/bug report. I encountered the following behavior today which I have not been able to track down and I believe is a bug:
When utilizing the gazebo_ros_planer_move library to publish the
/odom
topic andodom to base_link
frame the time stamp fails when utilizing an installation of gazebo8, but succeeds with gazebo7.To recreate:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable
lsb_release -cs
main" > /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo apt update sudo apt remove ros-kinetic-gazebo- sudo apt install ros-kinetic-gazebo8-rosparam set robot_description "$(xacro bugtest.urdf)" rosrun gazebo_ros spawn_model -urdf -param robot_description -model bugtest rosrun robot_state_publisher robot_state_publisher