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

Inconsistency between CPP/H names in rclUE and gen_ue_from_ros #27

Open
mhl787156 opened this issue Jul 26, 2024 · 5 comments
Open

Inconsistency between CPP/H names in rclUE and gen_ue_from_ros #27

mhl787156 opened this issue Jul 26, 2024 · 5 comments

Comments

@mhl787156
Copy link

Hi!

I've been trying to just build my custom msgs for use within UE and rclUE.
I did not understand how to get docker to work so I've been building it locally using the scripts inside BuildROS2 and CodeGen

I've had to make a number of minor changes to the script to make it work (which I will detail below) but the biggest one is the inconsistency between CPP/H names in rclUE and gen_ue_from_ros.

In rclUE, the names of the files are all ROS2+<MSG_NAME> e.g. a pose message is ROS2Pose.cpp with all references within the header files to the same name.

However, the update_msg_name function inside gen_ue_from_ros will generate a name which is ROS2+<PKG_NAME>+<MSG_NAME>, i.e. ROS2GeometryMsgsPose.cpp

Now this is an issue for two reasons

  1. I do not wish to rebuild all of the messages from scratch with this new naming convention (and I couldn't get this to work anyway)
  2. If I just rebuild my custom msgs, any references to existing ros msg types will fail

I did change update_msg_name back to just using the type name, but unfortunately I had a msg name clash between an existing package and mine.

My final hacky solution was to use the DEFAULT_DEPENDENCY_PKGS to choose whether we append the pkg name, with custom msgs always having their pkg name. Not ideal!

So either the rclUE branch (UE5_devel_humble) should be updated with the new format, or something done here to mitigiate for it!

Other bugs:

  • build_and_install_ros2_*.py both missing the import os at the top
  • It's annoying that they all use ros2_ws hardcoded in, took me a while to figure out how to point UE_TOOLS at my msgs
  • build_and_install_ros2_pkgs.py remove default on took a while to debug as it kept on deleting my ros2_ws folder before I realised
  • gen_ue_from_ros.py target argument requires a dictionary for some reason, but args only takes a list.
  • gen_ue_from_ros.py dependency was empty by default, I set it to DEFAULT_DEPENDENCY_PKG_PATHS so it could find the dependencies from the standard ros2 installation.
  • gen_ue_from_ros.py BASE_ROS_INSTALL_PATH had to update to humble
  • post_generate.py set remove to false as kept on deleting everything in rclUE/public and private when I just wanted it to add my new msgs. Added an argument for remove. Had to re-pull turtlebot project to get them back! Messed up my demo as I didn't realise this wasn't happening

Hope these observations help!

@james-yoo
Copy link

@yuokamoto,
I am also struggling with using UE_Tools to add custom ros msg to rclUE plugin. Could you please update the README with a step by step guide to adding custom messages using docker?

@yuokamoto
Copy link
Contributor

Thanks for your comments and sorry not responding.

I will look into.

@yuokamoto
Copy link
Contributor

I did not understand how to get docker to work so I've been building it locally using the scripts inside BuildROS2 and CodeGen

Could you provide more details on which step you encountered the error?

@yuokamoto
Copy link
Contributor

Bychanging this part in config.yaml, you can change msg name

nav2_msgs: ''

@yuokamoto
Copy link
Contributor

gen_ue_from_ros.py BASE_ROS_INSTALL_PATH had to update to humble
where is it?

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

3 participants