Ask Your Question
1

run_id on parameter server does not match declared run_id

asked 2018-12-17 03:38:08 -0500

teshansj gravatar image

updated 2018-12-17 04:01:53 -0500

I have set up several roslaunch files to be launched at system startup using systemd. However at the startup they show the above error and fail. When I set the systemd services to be restarted on failure, launch files are relaunched when failed and work fine. What might I be doing wrong here? Declared run_id for each roslaunch seems to be different from each other at the first launch.

The error is in the following format

run_id on parameter server does not match declared run_id: 686cb5dc-01cf-11e9-ab7c-b10995016401 vs 68b27f9a-01cf-11e9-ab7c-b10995016401

Here's a sample script that runs a launch file

#!/bin/bash
sleep 1
source /opt/ros/kinetic/setup.bash
source /my/workspace/path/devel/setup.bash
roslaunch /launch/file/path/myfile.launch

Here's the format of the systemd services I use

[Unit]
Description=Unit description
Wants=roscore.service
BindsTo=roscore.service

[Service]
User=username
ExecStart=/script/that/runs/the/launch/file.sh
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target

roscore.service starts a roscore. I am using kinetic on Ubuntu 16.04.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-12-17 10:18:23 -0500

teshansj gravatar image

Adding a delay before starting the services (except for the roscore) solved the problem. roslaunch tries to get the run id from an existing ros master and if it can't get it, it creates a one of its own.Hence the conflict. Seems like the problem was a timing issue. The problem occurred when I was using a mechanical hard drive. The services work fine without using such delays, on a system with similar hardware but with a SSD.

(I have added ExecStartPre=/bin/sleep 10 to the services to get them to work)

edit flag offensive delete link more
0

answered 2019-08-30 05:54:28 -0500

t-low gravatar image

Hi!

With this you only reduce the likelihood of things going wrong. A better solution in my opinion would be to add --wait to the roslaunch commands as documented here: http://wiki.ros.org/roslaunch/Command...

This way roslaunch will wait until it detects a roscore (as configured per ROS_MASTER_URI) and you avoid the less clean "sleep solution".

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-12-17 03:38:08 -0500

Seen: 1,306 times

Last updated: Dec 17 '18