Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_manipulator_x_controller build issue - colcon fails to build packge #240

Open
ajaysonar opened this issue Oct 5, 2022 · 4 comments
Assignees

Comments

@ajaysonar
Copy link

Hello,

I am trying to setup Openmanipulator-X (Ubuntu 22.04 + ROS2 Humble). While following the instruction on,
https://emanual.robotis.com/docs/en/platform/openmanipulator_x/quick_start_guide/#install-ubuntu-on-pc

after executing, colcon build --symlink-install, I get the following error...

Starting >>> open_manipulator_x_controller
--- stderr: open_manipulator_x_controller
/home/ros2desk/colcon_ws/src/open_manipulator/open_manipulator_x_controller/src/open_manipulator_x_controller.cpp: In member function ‘void open_manipulator_x_controller::OpenManipulatorXController::init_parameters()’:
/home/ros2desk/colcon_ws/src/open_manipulator/open_manipulator_x_controller/src/open_manipulator_x_controller.cpp:66:26: error: no matching function for call to ‘open_manipulator_x_controller::OpenManipulatorXController::declare_parameter(const char [4])’
66 | this->declare_parameter("sim");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

AND...

/home/ros2desk/colcon_ws/src/open_manipulator/open_manipulator_x_controller/src/open_manipulator_x_controller.cpp:67:26: error: no matching function for call to ‘open_manipulator_x_controller::OpenManipulatorXController::declare_parameter(const char [15])’
67 | this->declare_parameter("control_period");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

All I could tell was it has something to do with the "sim" and "control_period" parameters. Any feedback would be appreciated.

Thanks!

@ajaysonar ajaysonar changed the title ROS2 Humble package installation - colcon fails to build packge open_manipulator_x_controller build issue - colcon fails to build packge Oct 6, 2022
@irenebm
Copy link

irenebm commented Nov 16, 2022

The parameters should be declare with default values. Thus, that code section would be:

this->declare_parameter("sim", default);
this->declare_parameter("control_period", default);

Take into account that the parameter type is inferred from the default value.

For example, in this case could be:

this->declare_parameter("sim", false);
this->declare_parameter("control_period", 0.010);

So sim would be set to a bool type and control_period would be set to a double type, which are the types assing in the yaml file.

@Aki1608
Copy link

Aki1608 commented Jun 21, 2023

@irenebm, Thanks this solves the issue.

@Gredin67
Copy link

Gredin67 commented Jul 12, 2023

@irenebm @Aki1608 @ajaysonar Can someone open a pull request to solve this issue ?
edit : it worked with

this->declare_parameter("sim", false);
this->declare_parameter("control_period", 0.010);

I tried to replace

  // Declare parameters that may be set on this node
  this->declare_parameter("sim");
  this->declare_parameter("control_period");

with

this->declare_parameter("sim", default);
this->declare_parameter("control_period", default);

and I'm still getting

error: expected primary-expression before ‘default’
   66 |   this->declare_parameter("sim", default);

Should I change something in the parameter file ? src/open_manipulator/open_manipulator_x_controller/param/open_manipulator_x_controller_params.yaml

open_manipulator_x_controller:
  ros__parameters:
    sim: false
    control_period: 0.010

@ROBOTIS-Will
Copy link
Contributor

Thanks for reviewing this issue.
We're working on OpenMANIPULATOR-X package for Humble and Iron.
Based on current progress, I'm expecting to update the code by mid August at the latest, but you may see some WIP branches soon.
I'll make sure to reflect this information in the update.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants