Ask Your Question
0

what can be put into node tag args=" HERE"

asked 2015-10-21 01:50:38 -0500

johnny.lin gravatar image

It seems like the args attribute in <node> tag can have many values and I am wondering what kinds of values we should assign to args attributes in <node> tag. For example, the following launch file:

<launch>

    <arg name="base" default="$(env BULLETSIM_SOURCE_DIR)/data/bagfiles"/>
    <arg name="filename" />
    <arg name="camera" default="kinect1"/>

    <include file="$(find openni_launch)/launch/openni.launch">
        <arg name="camera" value="$(arg camera)" />
        <arg name="load_driver" value="false" />
        <arg name="depth_registration" value="true" />
    </include>

    <node name="rosbag_$(arg camera)" pkg="rosbag" type="play" args="-k --clock $(arg base)/$(arg filename).bag" /> 

    <!--
    <node pkg="rosbag" type="play" name="rosbag" args="-l $(arg base)/$(arg filename).bag /kinect1:=/kinect1_rec" /> 
    <node pkg="image_transport" type="republish" name="image_transport_color" args="theora in:=/kinect1_rec/rgb/image_rect_color raw out:=/kinect1/rgb/image_rect_color" />
    -->

</launch>

Another launch file is like this:

<launch>

    <arg name="camera" default="kinect1"/>
    <arg name="online" default="true"/>
    <arg name="bus" default="1"/>
    <arg name="filename"/>

    <group if="$(arg online)">
        <param name="use_sim_time" value="false" />
        <include file="$(find openni_launch)/launch/openni.launch">
            <arg name="camera" value="$(arg camera)" />
            <arg name="device_id" value="$(arg bus)@0" />
            <arg name="depth_registration" value="true" />
        </include>
    </group>
    <group unless="$(arg online)">
        <param name="use_sim_time" value="true" />
        <include file="play_cloud.launch">
            <arg name="camera" value="$(arg camera)" />
            <arg name="filename" value="$(arg filename)" />
        </include>
    </group>

    <node name="drop1" pkg="topic_tools" type="drop" args="/$(arg camera)/depth_registered/points 2 3 /drop/points"/>
    <node name="preprocessor" pkg="binary_symlinks" type="qpreprocessor_node" output="screen"  args="--inputTopic=/drop/points --downsample=0.008 --removeOutliers=true --outlierRadius=0.016 --outlierMinK=0 --clusterMinSize=15 --zClipLow=-0.02 --backgroundRead=false --backgroundFile=/home/alex/Desktop/preprocessor.yml" /> 

</launch>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-10-21 03:16:12 -0500

The args argument contains arguments that are directly passed unaltered to the executable when starting it. Your second example for instance is the same as manually starting the node using rosrun like this (ignoring the node name change):

rosrun binary_symlinks qpreprocessor_node --inputTopic=/drop/points --downsample=0.008 --removeOutliers=true --outlierRadius=0.016 --outlierMinK=0 --clusterMinSize=15 --zClipLow=-0.02 --backgroundRead=false --backgroundFile=/home/alex/Desktop/preprocessor.yml
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

1 follower

Stats

Asked: 2015-10-21 01:50:38 -0500

Seen: 273 times

Last updated: Oct 21 '15