Open rehman257800 opened 9 months ago
Looks like you are trying to build for ROS 2 Foxy (although you are then trying to install it for ROS 2 Galactic?!). Either way, please have a look here: https://github.com/ika-rwth-aachen/mqtt_client/issues/27#issuecomment-1620651162
I was able to download the mqtt client on ros humble. but now when i am trying to connect with mqtt broker im getting this error
"phr7rng@RNG-C-001N7:~/ros_ws$ roslaunch mqtt_client standalone.launch
Traceback (most recent call last):
File "/usr/bin/roslaunch", line 34, in
i also tried this command "phr7rng@RNG-C-001N7:~/ros_ws$ ros2 launch mqtt_client standalone.launch.ros2.xml
ros2: command not found"
Something is not right with your ROS installation.
You said you installed it for ROS 2 Humble. But then you proceed to use "roslaunch", which is ROS 1. "ros2 launch" on the other hand, which is ROS 2, isn't installed at all.
Please consider wiping everything ROS-related and properly reinstalling ROS 2 Humble.
Please also note that alternatively you could also launch the mqtt_client in a Docker container, see README.
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_adapterargumentsmqtt_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):
AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
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.