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

Turtlesim: Unable to change background colour using .launch file

asked 2015-05-25 18:17:32 -0500

incessantexplorer gravatar image

updated 2015-06-03 11:01:58 -0500

Hello, I am trying to use .launch file to change the backgroud colour of the turtlesim node.

Here are my Codes:

First one:


    <node name="" pkg="turtlesim" type="turtlesim_node" output="screen" ns="/">

    <rosparam  ns="/">

    background_b: 10


    <node name="turtle_teleop_key" pkg="turtlesim" type="turtle_teleop_key" output="screen" />


and the second one:


<node name="turtlelaunch" pkg="turtlesim" type="turtlesim_node" output="screen" ns="/">
<param name ="/background_b" value="100" />
<node name="turtle_teleop_key" pkg="turtlesim" type="turtle_teleop_key" output="screen" />


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

  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

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 ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-03 16:12:47 -0500

Raman gravatar image

Hi, The second launch file provided seems to be more correct. So use it and delete the first one. If you are using catkin, make sure you cd to your catkin_ws and issue the catkin_make command at the terminal. Only then roslaunch your launch file. It should work then.

edit flag offensive delete link more


still does not work.

incessantexplorer gravatar image incessantexplorer  ( 2015-06-05 08:15:57 -0500 )edit

Question Tools

1 follower


Asked: 2015-05-25 18:15:46 -0500

Seen: 1,331 times

Last updated: Jun 03 '15