Ask Your Question
0

Cannot import module control_msgs

asked 2018-12-13 11:12:24 -0500

nzlz gravatar image

updated 2018-12-14 05:46:14 -0500

Hi everyone,

I am currently using ROS Crystal from source. I have a second workspace where i have included the control_msgs package for bouncy. LINK.

The problem in that after successfully building the package and sourcing the corresponding install/setup.bash file, I still cannot import that particular module in python.

The error is the typical ImportError: No module named control_msgs.

Any advide? Thanks

UPDATE

Trying to fix this myself at: https://github.com/nzlz/control_msgs/...

Error:

nestor@n-pc:~/ros2_mara_ws$ colcon build --merge-install --packages-select control_msgs
Starting >>> control_msgs
--- stderr: control_msgs                         
CMake Error at /home/nestor/ros2_ws/install/rosidl_adapter/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
  execute_process(/usr/bin/python3 -m rosidl_adapter --package-name
  control_msgs --arguments-file
  /home/nestor/ros2_mara_ws/build/control_msgs/rosidl_adapter__arguments__control_msgs.json
  --output-dir
  /home/nestor/ros2_mara_ws/build/control_msgs/rosidl_adapter/control_msgs
  --output-file
  /home/nestor/ros2_mara_ws/build/control_msgs/rosidl_adapter/control_msgs.idls)
  returned error code 1:

  KeyError processing template 'struct.idl.em': 'duration'

Call Stack (most recent call first):
  /home/nestor/ros2_ws/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:126 (rosidl_adapt_interfaces)
  CMakeLists.txt:39 (rosidl_generate_interfaces)


make: *** [cmake_check_build_system] Error 1
---
Failed   <<< control_msgs   [ Exited with code 2 ]

Summary: 0 packages finished [1.49s]
  1 package failed: control_msgs
  1 package had stderr output: control_msgs
edit retag flag offensive close merge delete

Comments

What python version are you using?

allenh1 gravatar image allenh1  ( 2018-12-13 13:22:01 -0500 )edit

not working with any, 2 or 3.

nzlz gravatar image nzlz  ( 2018-12-13 13:25:43 -0500 )edit

What does python --version say?

allenh1 gravatar image allenh1  ( 2018-12-13 13:29:00 -0500 )edit

2.7 and 3.6.7. But this must be an issue related to he control_msgs repo as @dirk-thomas has pointed.

nzlz gravatar image nzlz  ( 2018-12-13 13:51:14 -0500 )edit

Were you able to compile https://github.com/nzlz/control_msgs? I had to add unique_identifier_msgs as a dependency.

ipa-hsd gravatar image ipa-hsd  ( 2019-02-22 09:31:01 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-12-13 13:31:17 -0500

Dirk Thomas gravatar image

Looking at the CMakeLists.txt file of the package I don't think it is functional at the moment. While it enumerates several interface files ( https://github.com/ros-controls/contr... ) it doesn't call rosidl_generate_interfaces anywhere. You might want to fill a ticket upstream about the problem.

edit flag offensive delete link more

Comments

Okay, thanks!

nzlz gravatar image nzlz  ( 2018-12-13 13:38:28 -0500 )edit

Hello Dirk,

I submitted the issue but I got no answer. Since I have an old repo that I manage to build successfully, I am just trying to migrate the control_msgs myself. Could you please take a look at the updated post?

Thanks in advance,

nzlz gravatar image nzlz  ( 2018-12-14 05:49:23 -0500 )edit

I have now added an issue to track this: https://github.com/ros-controls/contr...

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2018-12-14 09:35:24 -0500 )edit

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: 2018-12-13 11:12:24 -0500

Seen: 739 times

Last updated: Dec 14 '18