ros-simulation / gazebo_ros_demos

Example robots and code for interfacing Gazebo with ROS
352 stars 226 forks source link

Small fixups for compatibility with noetic #44

Open lucbettaieb opened 3 years ago

lucbettaieb commented 3 years ago

Small fixups to fix compatibility issues in noetic.

Seems like robot_state_publisher's executable name changed from state_publisher to robot_state_publisher.

Had to also fix a compatibility issue in rrbot_rqt that gave this error:

process[rrbot_rqt-1]: started with pid [88403]
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/rqt_gui/rqt_gui", line 13, in <module>
    sys.exit(main.main())
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/main.py", line 61, in main
    return super(
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/main.py", line 614, in main
    perspective_manager.import_perspective_from_file(
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/perspective_manager.py", line 360, in import_perspective_from_file
    self._convert_values(data, self._import_value)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/perspective_manager.py", line 422, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/perspective_manager.py", line 422, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/perspective_manager.py", line 422, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/perspective_manager.py", line 419, in _convert_values
    keys[key] = convert_function(keys[key])
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/perspective_manager.py", line 429, in _import_value
    return QByteArray.fromHex(eval(value['repr(QByteArray.hex)']))
  File "<string>", line 1, in <module>
TypeError: arguments did not match any overloaded call:
  QByteArray(): too many arguments
  QByteArray(int, str): argument 1 has unexpected type 'str'
  QByteArray(Union[QByteArray, bytes, bytearray]): argument 1 has unexpected type 'str'
[rrbot_rqt-1] process has died [pid 88403, exit code 1, cmd /opt/ros/noetic/lib/rqt_gui/rqt_gui --perspective-file /home/luc/test_ws/src/gazebo_ros_demos/rrbot_control/launch/rrbot_rqt.perspective __name:=rrbot_rqt __log:=/home/luc/.ros/log/32ad11c4-a6d9-11eb-a619-8b46fc313cf8/rrbot_rqt-1.log].
log file: /home/luc/.ros/log/32ad11c4-a6d9-11eb-a619-8b46fc313cf8/rrbot_rqt-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Using this ROS Answers result: https://answers.ros.org/question/365220/rqt_gui-error-in-perspective-manager-in-ros-noetic/

lucbettaieb commented 3 years ago

https://user-images.githubusercontent.com/1468145/116298758-b2452e80-a751-11eb-98c2-f49978bc11e4.mp4

I was able to run this demo on my branch.

FWIW:

luc@p15 ~/test_ws/src/gazebo_ros_demos (luc/noetic-devel) $ env | grep ROS
ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/home/luc/test_ws/src:/home/luc/dev/noetic/src:/opt/ros/noetic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/luc/test_ws/devel/share/common-lisp:/home/luc/dev/noetic/devel/share/common-lisp
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
lucbettaieb commented 3 years ago

ping @davetcoleman :heart:

lucbettaieb commented 3 years ago

Maybe @wjwwood ? Is this useful?

wjwwood commented 3 years ago

@lucbettaieb Sorry, this isn't my repository so I don't feel comfortable just merging things. I can help someone take it over if @davetcoleman wishes, but I don't have time to take responsibility for it.

lucbettaieb commented 3 years ago

No problem, thanks for the response.

lucbettaieb commented 3 years ago

Bump for @davetcoleman :)

Let me know if this is useful, please!

davetcoleman commented 3 years ago

sorry i don't have bandwidth for this anymore... i almost never get to code in my new role :-/

lucasw commented 2 years ago

Commands to use these fixes in an existing repo (instead of git cloning git@github.com:lucbettaieb/gazebo_ros_demos.git directly)

git remote add lucbettaieb git@github.com:lucbettaieb/gazebo_ros_demos.git
git fetch lucbettaieb 
git checkout luc/noetic-devel

This looks to overlap with #43 and #40, I think the joint_state_publisher_gui fix from #43 is also needed.

@davetcoleman can you grant someone privileges to take over for you here (or maybe 2 people but require 2 reviewers)? Mostly a noetic-devel branch ought to be created with a combination of these PRs, kinetic-devel can stay as is.

gokulmaxi commented 2 years ago

It would be nice to revive this project.