Ask Your Question
1

Could not load controller 'joint_state_controller' because controller type 'joint_state_controller/JointStateController' does not exist

asked 2019-07-06 17:45:48 -0500

crazy_computer gravatar image

updated 2019-07-07 09:19:28 -0500

Hello world,

I am running into the issue of not being able to load my controllers and I am getting this error:

[ERROR] [1562494434.299706787, 0.160000000]: Could not load controller 'gimbal_r_joint_position_controller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/firefly/vi_sensor/gimbal_r_joint_position_controller')?
[ERROR] [1562494435.300931, 1.160000]: Failed to load gimbal_r_joint_position_controller

[INFO] [1562494435.301550, 1.160000]: Loading controller: gimbal_p_joint_position_controller
[ERROR] [1562494435.304706403, 1.170000000]: Could not load controller 'gimbal_p_joint_position_controller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/firefly/vi_sensor/gimbal_p_joint_position_controller')?
[ERROR] [1562494436.305523, 2.170000]: Failed to load gimbal_p_joint_position_controller

[INFO] [1562494436.306111, 2.170000]: Loading controller: gimbal_y_joint_position_controller
[ERROR] [1562494436.308813421, 2.170000000]: Could not load controller 'gimbal_y_joint_position_controller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/firefly/vi_sensor/gimbal_y_joint_position_controller')?
[ERROR] [1562494437.310188, 3.170000]: Failed to load gimbal_y_joint_position_controller

[INFO] [1562494437.310789, 3.170000]: Loading controller: joint_state_controller
[ERROR] [1562494437.313623297, 3.170000000]: Could not load controller 'joint_state_controller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/firefly/vi_sensor/joint_state_controller')?
[ERROR] [1562494438.314230, 4.080000]: Failed to load joint_state_controller

I get this error for each of the controllers that I am trying to load. I am able to see that they type is loaded to the param server under the correct namespace when I run "rosparam list":


>     j*******@j********:~/rotors_ws$ rosparam list /vi_sensor
> /vi_sensor/gimbal_p_joint_position_controller/joint
> /vi_sensor/gimbal_p_joint_position_controller/pid/d
> /vi_sensor/gimbal_p_joint_position_controller/pid/i
> /vi_sensor/gimbal_p_joint_position_controller/pid/p
> /vi_sensor/gimbal_p_joint_position_controller/type
> /vi_sensor/gimbal_r_joint_position_controller/joint
> /vi_sensor/gimbal_r_joint_position_controller/pid/d
> /vi_sensor/gimbal_r_joint_position_controller/pid/i
> /vi_sensor/gimbal_r_joint_position_controller/pid/p
> /vi_sensor/gimbal_r_joint_position_controller/type
> /vi_sensor/gimbal_y_joint_position_controller/joint
> /vi_sensor/gimbal_y_joint_position_controller/pid/d
> /vi_sensor/gimbal_y_joint_position_controller/pid/i
> /vi_sensor/gimbal_y_joint_position_controller/pid/p
> /vi_sensor/gimbal_y_joint_position_controller/type
> /vi_sensor/joint_state_controller/publish_rate
> /vi_sensor/joint_state_controller/type

Here is my .yaml file.

vi_sensor:
  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50  

  # Position Controllers ---------------------------------------
  gimbal_r_joint_position_controller:
    type: effort_controllers/JointPositionController
    joint: gimbal_r_joint
    pid: {p: 100.0, i: 1.0, d: 25.0}
  gimbal_p_joint_position_controller:
    type: effort_controllers/JointPositionController
    joint: gimbal_p_joint
    pid: {p: 100.0, i: 1.0, d: 13.0}
  gimbal_y_joint_position_controller:
    type: effort_controllers/JointPositionController
    joint: gimbal_y_joint
    pid: {p: 100.0, i: 1.0, d: 13.0}

The file is loaded by the following line:

<rosparam file="$(find rotors_gazebo)/config/gimbal_control.yaml" command="load" ns="/firefly/vi_sensor"/>

I have tried many many things to help make this gimbal work, but this is what is stopping me from moving forward. I am able to make the gimbal work when it is not attached to a drone, so I know that it works correctly; however, when it is attached to the drone I run into this error. I am guessing it is a namespace issue, but I am not sure what it is.

Any help is appreciated. Thank you!!

edit retag flag offensive close merge delete

Comments

1

Can you please edit your question using the preformatted text (101010) button (which is for code/terminal output/etc.) instead using the quotation (") button, which is for quoting. It'll make your question easier to read.

jayess gravatar imagejayess ( 2019-07-06 21:39:04 -0500 )edit

Just made those edits, thank you!

crazy_computer gravatar imagecrazy_computer ( 2019-07-07 09:13:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-07 10:01:43 -0500

crazy_computer gravatar image

So, I ended up finding the issue. As suspected it was a namepsace issue in loading the .yaml file to the param server. If in the future you have this issue, please pay close attention to how you are using this line:

<rosparam file="$(find rotors_gazebo)/config/gimbal_control.yaml" command="load" ns="/firefly/vi_sensor"/>

When defining namespace in that line, it ends up appending the namespace onto the namespace you are already in.

This is why I ended up with my namespace being something like "/firefly/vi_sensor/vi_sensor" and because of this, the yaml file was being loaded, just to a different location than the controllers.

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

2 followers

Stats

Asked: 2019-07-06 17:45:48 -0500

Seen: 90 times

Last updated: Jul 07