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

Why it shows unknown substitution command?

asked 2018-08-16 12:40:08 -0500

Pujie gravatar image

I try to use a launch file. But it shows unknown substitution command. I don't know why.

<launch>
    <param name="/use_sim_time" value="true"/>
    <arg name="map_file" default="$(find turtlebot3_navigation)/maps/map.yaml"/>
    <arg name="open_rviz" default="true"/>


    <!-- Run the map server -->
    <node name="map_server" pkg="map_server" type="map_server" args="$(turtlbot3_navigation)/map/map.yaml" >
        <param name="frame_id" value="/map" />
    </node>

    <group ns="robot1">
        <param name="tf_prefix" value="robot1_tf" />
        <param name="amcl/initial_pose_x" value="1" />
        <param name="amcl/initial_pose_y" value="1" />
        <include file="$(find turtlebot3_navigation)/launch/new_move_base.launch" />
    </group>

    <group ns="robot2">
        <param name="tf_prefix" value="robot2_tf" />
        <param name="amcl/initial_pose_x" value="-1" />
        <param name="amcl/initial_pose_y" value="1" />
        <include file="$(find turtlebot3_navigation)/launch/new_move_base.launch" />
    </group>

    <!--node pkg="rviz" type="rviz" name="rviz" args="-d $(find your_pkg)/config/multi.vcg"
          output="screen" -->
    <node pkg="rviz" type="rviz" name="rviz" required="true"
          args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navigation.rviz"/>
</launch>

The terminal shows:

roslaunch turtlebot3_navigation multiple_navigation.launch 
... logging to /home/ise-admin/.ros/log/406b2672-a176-11e8-841a-509a4c311940/roslaunch-ise-linux-1-6017.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Unknown substitution command [turtlbot3_navigation]. Valid commands are ['find', 'env', 'optenv', 'anon', 'arg']
The traceback for the exception was written to the log file

I can't find the log file in /.ros/log. Do you know why it shows Unknown substitution command?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-08-16 15:43:54 -0500

gvdhoorn gravatar image

updated 2018-08-16 15:46:16 -0500

<node name="map_server" pkg="map_server" type="map_server" args="$(turtlbot3_navigation)/map/map.yaml" >

This seems to be missing a find right before turtlbot3_navigation in the args attribute.

turtlbot3_navigation is not a valid roslaunch substitution command, so the error would seem to be correct.

It should probably be:

args="$(find turtlebot3_navigation)/map/map.yaml"

(note I also corrected the typo there (missing e between l and b)

edit flag offensive delete link more

Comments

Thank you very much!!! I didn't find it even with the compiler. It is amazing that you find out it directly. Thank you again!

Pujie gravatar image Pujie  ( 2018-08-16 20:28:13 -0500 )edit

compiler

which compiler?

A launch file is not compiled, so building your workspace wouldn't help.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-17 01:46:28 -0500 )edit

You are right. I use clion. At least, a compiler helps to find out the key words and have a better arrangement of each line.

Pujie gravatar image Pujie  ( 2018-08-17 01:58:21 -0500 )edit
1

Ah, you mean an IDE?

gvdhoorn gravatar image gvdhoorn  ( 2018-08-17 01:59:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-16 12:40:08 -0500

Seen: 5,217 times

Last updated: Aug 16 '18