Skip to content

Error when downloading mqtt bridge for ROS2. #44

@rehman257800

Description

@rehman257800

When im trying to build workspace using this command "colcon build --packages-up-to mqtt_client --cmake-args -DCMAKE_BUILD_TYPE=Release" for ROS2.

Im getting this error
"colcon build --packages-up-to mqtt_client --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> mqtt_client_interfaces
--- stderr: mqtt_client_interfaces
CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
execute_process(/home/aexlab/anaconda3/bin/python3 -m rosidl_adapter
--package-name mqtt_client_interfaces --arguments-file
/home/aexlab/ros2_ws/src/build/mqtt_client_interfaces/rosidl_adapter__arguments__mqtt_client_interfaces.json
--output-dir
/home/aexlab/ros2_ws/src/build/mqtt_client_interfaces/rosidl_adapter/mqtt_client_interfaces
--output-file
/home/aexlab/ros2_ws/src/build/mqtt_client_interfaces/rosidl_adapter/mqtt_client_interfaces.idls)
returned error code 1:

AttributeError processing template 'msg.idl.em'

Traceback (most recent call last):

File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
  em.BUFFERED_OPT: True,

AttributeError: module 'em' has no attribute 'BUFFERED_OPT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/aexlab/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
  return _run_code(code, main_globals, None,
File "/home/aexlab/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
  exec(code, run_globals)
File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/__main__.py", line 19, in <module>
  sys.exit(main())
File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/main.py", line 53, in main
  abs_idl_file = convert_to_idl(
File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/__init__.py", line 19, in convert_to_idl
  return convert_msg_to_idl(
File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/msg/__init__.py", line 39, in convert_msg_to_idl
  expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1')
File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
  content = evaluate_template(template_name, data)
File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
  _interpreter.shutdown()

AttributeError: 'NoneType' object has no attribute 'shutdown'

Call Stack (most recent call first):
/opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
CMakeLists.txt:14 (rosidl_generate_interfaces)


Failed <<< mqtt_client_interfaces [2.66s, exited with code 1]

Summary: 0 packages finished [3.53s]
1 package failed: mqtt_client_interfaces
1 package had stderr output: mqtt_client_interfaces
1 package not processed" ,

I even tried to use this "sudo apt install ros-galactic-mqtt-client" but got this error

"
[sudo] password for aexlab:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-galactic-mqtt-client".
i dont know why is this happening.
I was able to clone the repositary but can not build it.

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