0
$\begingroup$

Rosanswers logo

Hello,

i'm using Ubuntu 14.04 on virtualbox and ros indigo. I only have a lms100 laser scanner (not robot system) and trying to create a map with hector-slam. So i learned that i need to modify launch files like mapping_default.launch and tutorial.launch

i figured out that these files are read-only. so how can i modify them?

Thanks,

Basak


Originally posted by bsk on ROS Answers with karma: 73 on 2016-05-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Many of the launch files are configurable. Anything in the original launch file with the "arg" tag can be set.

If you need to heavily modify the original launch file, create your own package and copy the launch file to your new package. Then you can edit however you'd like. I would only recommend this if the original launch file arguments don't do what you need (they typically do).

Since you are using a laser scanner without a robot system, you'll need to set the base_link frame to whatever frame your laser scanner is in, since that is your "robot".


Originally posted by curranw with karma: 211 on 2016-05-11

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by bsk on 2016-05-12:
Yes i need to modify arg like you said(i need to change odom_frame and base_frame value) so how can i do that? How can i set these arg?

Comment by curranw on 2016-05-12:
See the link I posted (http://wiki.ros.org/roslaunch/XML/arg).

When you include other launch files in your launch file, you can use the arg tag. See example 1.1.

If you'd like to do this on the command line, see example 1.1.2.

Comment by curranw on 2016-05-12:
Also: See http://answers.ros.org/question/29461/roslaunch-with-arguments/

Comment by bsk on 2016-05-12:
I tried 1.1.2 and it works for mapping_default.launch but that didnt help me. Because main file to launch is tutorial.launch and it doesnt have arg to set. And i dont understand how to do exp 1.1 without creating a new package. I'm so lost :/

Comment by bsk on 2016-05-12:
And for that question, i cant add lines to original launch files. Unless i create a new package, that solution doesnt work for me :/ At the end i need to create a package i guess and it's a whole new problem for me

Comment by curranw on 2016-05-12:
As a general practice, you should always have your own package that does the specific task you want. For your case, that would be bringing up the laser node and running hector slam. If you'd like to do exactly what the tutorial does, you need to ...

Comment by curranw on 2016-05-12:
Copy the functionality of tutorial.launch (which uses mapping_default.launch) and set the arguments in your tags.

Comment by bsk on 2016-05-12:
So first i need to create a package in a catkin workspace(catkin_ws) and copy/create my version of tutorial.launch and try to do things, right? thanks, now i know what should i try to do :)

Comment by bsk on 2016-05-18:
@curranw how can i learn that my laser scanner is in which frame?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.