rospy.get_param('~namespace') problem [closed]

asked 2013-03-15 04:16:34 -0600

Rizqa gravatar image

updated 2016-10-24 08:34:39 -0600

ngrennan gravatar image

I am trying to control a dynamixel ax-12 servo by using kinect.. I just use one servo I followed the tutorials in pi_robot package http://www.ros.org/wiki/openni/Contests/ROS%203D/Skeleton%20Tracker%20Teleoperation%20Package%20for%20Mobile%20Robot

When I start robotis.launch, it works fine.. But when i start dynamixels.launch to control my servo.. it has problems..

[WallTime: 1363352924.628046] /dev/ttyUSB0 controller_spawner: waiting for controller_manager None to startup in /ax12_controller/namespace...

Traceback (most recent call last): File "/home/rizqa/trunk2/pi_tracker/bin/controller_manager.py", line 251, in manager = ControllerManager()

File "/home/rizqa/trunk2/pi_tracker/bin/controller_manager.py", line 78, in __init__ manager_namespace = rospy.get_param('~namespace')
File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/client.py", line 378, in get_param return _param_server[param_name] #MasterProxy does all the magic for us

File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/msproxy.py",line 117, >in __getitem__ raise KeyError(key) KeyError: '~namespace'

I'm not sure why the controller_manager None to start up..

dynamixel.launch ( for a while, I just one servo )

<launch>
  <param name="robot_description" command="cat $(find pi_tracker)/urdf/b_robot.urdf" />
  <param name="/use_sim_time" value="False" />

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
    <param name="publish_frequency" value="50.0"/>
  </node>

    <!-- Define the namespace for all our controllers -->
    <arg name="ax12_namespace" value="ax12_controller" />

    <!-- Start the ax12 controller manager -->
    <node ns="$(arg ax12_namespace)" name="ax12_manager" pkg="pi_tracker" type="controller_manager.py" required="true" output="screen">
        <param name="port_name" type="str" value="/dev/ttyUSB0" />
        <param name="baud_rate" type="int" value="1000000"/>
        <param name="min_motor_id" type="int" value="1"/>
        <param name="max_motor_id" type="int" value="1"/>
        <param name="update_rate" type="int" value="10"/>
    </node>

    <!-- Load joint controller configuration to parameter server -->
    <rosparam ns="$(arg ax12_namespace)" file="$(find pi_tracker)/params/dynamixels_params.yaml" command="load"/>

    <!-- Start individual joint controllers -->
    <node ns="$(arg ax12_namespace)" name="pi_tracker" pkg="pi_tracker" type="controller_spawner.py"
          args="--port /dev/ttyUSB0
        head_pan_controller"
        output="screen" />

    <!-- Start the ax12 joint state publisher -->
    <node ns="$(arg ax12_namespace)" name="ax12_joint_state_publisher" pkg="pi_tracker" type="ax12_joint_state_publisher.py" output="screen">
        <rosparam file="$(find pi_tracker)/params/dynamixels_params.yaml" command="load"/>
    </node>
</launch>

How could this problem solved..?? thanks..

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-11-26 03:08:07.454289

Comments

I have solved the problem..

Rizqa gravatar imageRizqa ( 2013-03-16 02:09:25 -0600 )edit
3

Please state how you did this as an answer so others can benefit.

tfoote gravatar imagetfoote ( 2013-06-12 11:43:15 -0600 )edit

Same problem here. Sad that answer was not provided.

Tõnu Samuel gravatar imageTõnu Samuel ( 2014-03-31 02:30:47 -0600 )edit