ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
5

run_id on parameter server does not match declared run_id

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

teshansj gravatar image

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

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
4

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

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

Comments

This should be the accepted answer.

chfritz gravatar image chfritz  ( 2020-06-17 17:29:41 -0600 )edit

very useful

rjosodtssp gravatar image rjosodtssp  ( 2020-07-14 20:48:43 -0600 )edit
0

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

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

Question Tools

2 followers

Stats

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

Seen: 9,090 times

Last updated: Dec 17 '18