Ask Your Question

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:


    <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" />

    <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" />


Another launch file is like this:


    <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" />
    <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)" />

    <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" /> 

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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


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

Seen: 273 times

Last updated: Oct 21 '15