1
$\begingroup$

Rosanswers logo

My team uses a monorepo that contains all our ros nodes for our robots. We'd like to begin migrating some of our nodes to ros2 and use the ros1 bridge in a hybrid ros1/ros2 system so that we don't have to port all nodes all at once. Most tutorials I've found suggest keeping your ros1 nodes and ros2 nodes in separate workspaces, but that's not ideal because we use a monorepo that we clone into our ros workspace. And moving these into another repo would lose our git history.

How can we have ros1 and ros2 packages in the same repo?


Originally posted by lexi on ROS Answers with karma: 41 on 2022-01-19

Post score: 0


Original comments

Comment by aarsh_t on 2022-01-19:
may you can consider restructuring the repo and inside the repo you can create 2 sub folders named ros1/ and ros2/ and both to be build separately in their own folders. But mixing both the versions of ros is not possible as far as my knowledge.

Comment by lexi on 2022-01-19:
Okay, I think we are going to manage this within our docker container by mounting different packages into different locations in the container.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

You could try to work withrospy2 package to convert your ROS1 Python packages to ROS2 faster (repo).

Otherwise @aarsh_t's comment (one repo, two subfolders for ROS1 and ROS2 packages) is the best option right now AFAIK too.


Originally posted by ljaniec with karma: 3064 on 2022-01-19

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

The solution we found was to use docker. This way we can have different packages mounted into different workspaces in the docker container. I imagine something similar could be done with symlinks on the native system. Like just creating an install script that creates 2 workspaces and then just creates symlinks in the appropriate workspaces for the appropriate packages (symlinks to ros1 packages in the ros1 workspace, and symlinks to ros2 packages in the ros2 workspace).


Originally posted by lexi with karma: 41 on 2022-01-19

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.