Skip to content

Exception thrown while initializing controller 'test_velocity_controller' - error not descriptive enough #501

@JanezCim

Description

@JanezCim

ROS Noetic
OS: Ubuntu 20.04
ros_control - branch noetic-devel - 53c2487 - pulled and compiled locally

when i start the controler manger with parameters pose_covariance_diagonal and twist_covariance_diagonal loaded from .launch file like this

<param name="/test_velocity_controller/pose_covariance_diagonal" value="[0.2, 0.2, 0.2, 0.2, 0.2, 0.2]"/>
<param name="/test_velocity_controller/twist_covariance_diagonal" value="[0.2, 0.2, 0.2, 0.2, 0.2, 0.2]"/>

I get an error.

[ERROR] [1634720945.369268249]: Exception thrown while initializing controller 'test_velocity_controller'
[ERROR] [1634720945.369395193]: Initializing controller 'test_velocity_controller' failed
[ERROR] [1634720946.372959]: Failed to load test_velocity_controller

I figured out that the correct way of loading list params into rosparam is like this:

<rosparam param="/test_velocity_controller/pose_covariance_diagonal">[0.2, 0.2, 0.2, 0.2, 0.2, 0.2]</rosparam>
<rosparam param="/test_velocity_controller/twist_covariance_diagonal">[0.2, 0.2, 0.2, 0.2, 0.2, 0.2]</rosparam>

and the thing ended up working afterward, but it took me A LONG LONG time to figure this out (more then i care to admit).

Problem: Exception thrown while initializing controller 'test_velocity_controller' is not descriptive enough in this edge case and it takes a lot of energy and backward engineering to actually find out what the heck is wrong.

Humble suggestion: Please make the error message more descriptive, ideally point out exactly what parameter is causing the exception but maybe point out also the reason.

Otherwise excellent work with the package! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions