0
$\begingroup$

Rosanswers logo

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!!


Originally posted by crazy_computer on ROS Answers with karma: 36 on 2019-07-06

Post score: 1


Original comments

Comment by jayess on 2019-07-06:
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.

Comment by crazy_computer on 2019-07-07:
Just made those edits, thank you!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by crazy_computer with karma: 36 on 2019-07-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by PumpkinIcedTea on 2022-01-13:
Hi may I know how you solved this problem ?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.