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

timesync error between px4 and mavros [simulation] #9577

Closed
alexcherpi opened this issue May 31, 2018 · 7 comments
Closed

timesync error between px4 and mavros [simulation] #9577

alexcherpi opened this issue May 31, 2018 · 7 comments

Comments

@alexcherpi
Copy link

alexcherpi commented May 31, 2018

Hi,
When I run the two following commands in two different terminals the simulation works without errors.

  1. no_sim=1 make posix_sitl_default gazebo (this runs px4)
  2. roslaunch gazebo_ros empty_world.launch world_name:=$(pwd)/Tools/sitl_gazebo/worlds/iris.world

But when I run this third command in a third terminal, I get "ERROR [mavlink] [timesync] Hard setting offset." in the terminal running px4.
3. roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"
In the mavros terminal I get this error: "[ WARN] [1527786373.403793887, 214.796000000]: TM: Clock skew detected (-0.013114400 s). Hard syncing clocks."

I'm running Ubuntu 16.04, with rosdistro: kinetic, with px4 v1.7.3.

@lamping7
Copy link
Member

lamping7 commented Jun 3, 2018

This error is normally a result of poor computer performance. Secondly, why are you launching all of these separatly instead of using the launch file px4 comes with to do all of this?

@alexcherpi
Copy link
Author

Thanks lamping7,
It should indeed be a result of poor computer performances. Nevertheless the good point is that everything is working and communicating (gazebo, ros, px4) except that I get in addition these warnings.
I am launching separately the gazebo ros and px4 processes in order not to relaunch everything if I just did some modifications in px4. And thus I only re-run the px4 process (keeping gazebo opened, indeed gazebo is quite slow to open on my computer).

@mhkabir
Copy link
Member

mhkabir commented Jun 19, 2018

If you update to latest mavros and latest PX4, you might not get these warnings, since the timesync was improved to work on worse links.

@alexcherpi
Copy link
Author

I am working with the latest mavros but with PX4 v1.7.3
When was the commit to remove these warnings ?

@mhkabir
Copy link
Member

mhkabir commented Jun 19, 2018

This is not from latest mavros :

"[ WARN] [1527786373.403793887, 214.796000000]: TM: Clock skew detected (-0.013114400 s). Hard syncing clocks."

PX4 timesync : #9365
Mavros timesync : mavlink/mavros#1042

@sunnyroad
Copy link

sunnyroad commented Aug 2, 2018

Hi,
would you help such issue I met on PX4?

If HEARTBEAT got before, and timesync one time success, everything is OK.
But if I manually change the linux systime on my local system, then everything block suddenly after once HEARTBEAT received.
I had tried the lastest Mavros timesync : mavlink/mavros#1042, it do not work, same result.

manually change linux systime via: "date -s @1489039690"

@stale
Copy link

stale bot commented Jan 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@mhkabir mhkabir closed this as completed Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants