Turtlesim: Unable to change background colour using .launch file
Hello, I am trying to use .launch file to change the backgroud colour of the turtlesim node.
Here are my Codes:
First one:
<launch>
<node name="" pkg="turtlesim" type="turtlesim_node" output="screen" ns="/">
<rosparam ns="/">
background_b: 10
</rosparam>
</node>
<node name="turtle_teleop_key" pkg="turtlesim" type="turtle_teleop_key" output="screen" />
</launch>
and the second one:
<launch>
<node name="turtlelaunch" pkg="turtlesim" type="turtlesim_node" output="screen" ns="/">
<param name ="/background_b" value="100" />
</node>
<node name="turtle_teleop_key" pkg="turtlesim" type="turtle_teleop_key" output="screen" />
</launch>
the output for rosparam_get /
nac@nac-Lenovo-G560:~/nachiket_ws/src/handouts/launch$ rosparam get /
background_b: 255
background_g: 86
background_r: 69
rosdistro: 'indigo
'
roslaunch:
uris: {host_nac_lenovo_g560__40475: 'http://nac-Lenovo-G560:40475/'}
rosversion: '1.11.10
'
run_id: e57a1672-0332-11e5-87f2-ec55f98a32e6
turtlelaunch: {background_b: 100}
and the rosparam list
nac@nac-Lenovo-G560:~/nachiket_ws/src/handouts/launch$ rosparam list
/background_b
/background_g
/background_r
/rosdistro
/roslaunch/uris/host_nac_lenovo_g560__40475
/rosversion
/run_id
/turtlelaunch/background_b
I am still unable to change the background colour. Even if the global namespace is specified, a new namespace is being create and the turtlesim background paramter that is to be set is getting sent under that namespace.
What am I missing ?