Hi Kevin,<div><br></div><div>I had gotten that far, but by what name do I then access the parameter from my python source? Neither <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">rospy.get_param('port') nor </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">rospy.get_param('~port') seem to work.</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">M.</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>

<br><br><div class="gmail_quote">On 14 July 2010 15:53, Kevin Watts <span dir="ltr"><<a href="mailto:watts@willowgarage.com">watts@willowgarage.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

That's not the correct syntax for private parameters. Your example puts them into the same namespace as the node, but not the private namespace.<br><br>You can find full details here:<br><br><a href="http://www.ros.org/wiki/roslaunch/XML/param" target="_blank">http://www.ros.org/wiki/roslaunch/XML/param</a><br>


<br>For your code, it might look like:<br><br><node pkg="something" ... ><br>  <param name="port" value="/dev/ttyUSB0" /><br></node><br><br><div class="gmail_quote"><div><div>

</div><div class="h5">On Wed, Jul 14, 2010 at 12:41 PM, Mike Purvis <span dir="ltr"><<a href="mailto:mpurvis@clearpathrobotics.com" target="_blank">mpurvis@clearpathrobotics.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5"><div>Hi everyone,</div><div><br></div>My current launch file structure is like so:<div>

<br></div>
<div><div><launch></div><div>  <env name="PYTHONPATH" value="$(env PYTHONPATH)" /></div><div>

  <group ns="clearpath/robots/$(optenv ID default)" clear_params="true"></div><div>    <param name="port" value="$(optenv CPR_SERIAL_PORT /dev/ttyUSB0)" /></div><div>    <param name="turn_radius" value="0.4" /></div>




<div><br></div><div>    ...</div><div><br></div><div>    <node pkg="clearpath_horizon" type="horizon.py" name="$(anon horizon)" output="screen" /></div><div>    <node pkg="clearpath_2dnav" type="simple.py" name="$(anon nav)" output="screen" /></div>




<div>    ....</div><div>  </group></div><div></launch></div></div><div><br></div><div>And then inside of horizon.py, I am able to access the parameter with rospy.get_param('port'). However, that parameter is really not relevant to any node except horizon.py. From my reading of the documentation, I should be able to make it private by putting the <param> tag inside the relevant node tag, and then calling it with rospy.get_param('~port'). However, this doesn't seem to work---I consistently just get the default parameter.</div>




<div><br></div><div>What am I doing wrong?</div><div><br></div><div>Thanks.</div>
<br></div></div>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br></div>