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

roslaunch. Passing parameters via command line

asked 2016-02-12 16:59:15 -0500

Randerson gravatar image

Hello all, I am performing the tutorial Customizing the Stage Simulator and I am facing issues with the following command line:

roslaunch turtlebot_stage turtlebot_in_stage.launch map_file:="~/stageTutorial/tutorial.yaml" world_file:="~/stageTutorial/tutorial.world"

When I execute it, the following erros occurs:

[FATAL] [1455317172.700221865]: The world file ~/stageTutorial/tutorial.world does not exist.

and

[ERROR] [1455317069.732110275]: Map_server could not open ~/stageTutorial/tutorial.yaml.

Nevertheless, the directory stageTutorial and both files tutorial.world and tutorial.yaml exist.

This behavior becomes weirder because of the fact that when I export the path of both files to the turtlebot environment variables the launch file behaves as expected. The cited commands are:

export TURTLEBOT_STAGE_MAP_FILE=~/stageTutorial/tutorial.yaml
export TURTLEBOT_STAGE_WORLD_FILE=~/stageTutorial/tutorial.world
roslaunch turtlebot_stage turtlebot_in_stage.launch

I do not have any clue about what is wrong and it is important to mention that the code was copied from a ros' tutorial without any change. So, here is my question: How can I run the fist roslaunch command correctly?

Thanks in advance.

edit retag flag offensive close merge delete

Comments

What happens if you use explicit absolute paths?

dchang0 gravatar image dchang0  ( 2016-02-12 20:16:45 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-03-22 01:57:58 -0500

WANG Jiankun gravatar image

Three steps needed. (1) change ~ to /home/useraccount (2) change bitmap "../tutorial.png" to bitmap "/tutorial.png" in tutorial.world (3) copy turtlebot.inc to /home/useraccount/stageTutorial

Then it will work.

edit flag offensive delete link more

Comments

WANG Jiankun 's advice is useful. But I believe the bitmap "../tutorial.png" should be changed to bitmap "tutorial.png".

zhili gravatar image zhili  ( 2017-05-29 03:15:50 -0500 )edit
0

answered 2016-02-13 08:47:42 -0500

130s gravatar image

I can confirm this happens on my machine, following turtlebo_stage's tutorial and using empty tutorial.world and tutorial.yaml files I just made up by touch command. I suggest you open an issue ticket at turtlebot_simulator issue tracker.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-02-12 16:59:15 -0500

Seen: 1,876 times

Last updated: Feb 13 '16