Configuring ROS2 with Eclipse
I have Built ROS2 on Linux with Eclipse but in the end when i build the project there are errors :
Traceback (most recent call last):
File "/home/aakash/ros2_ws/src/ament/ament_tools/scripts/ament.py", line 161, in <module>
sys.exit(main() or 0)
File "/home/aakash/ros2_ws/src/ament/ament_tools/ament_tools/commands/ament.py", line 88, in main
rc = args.main(args)
File "/home/aakash/ros2_ws/src/ament/ament_tools/ament_tools/verbs/build/cli.py", line 154, in main
packages = topological_order(opts.basepath)
File "/home/aakash/ros2_ws/src/ament/ament_tools/ament_tools/topological_order.py", line 120, in topological_order
packages = _find_unique_packages(root_dir)
File "/home/aakash/ros2_ws/src/ament/ament_tools/ament_tools/packages.py", line 97, in find_unique_packages
raise RuntimeError('\n'.join(lines))
RuntimeError: Multiple packages found with the same name "pendulum_msgs":
- ros2/demos/demo_nodes_msgs
- ros2/demos/pendulum_msgs
Asked by aks on 2018-05-28 11:19:44 UTC
Answers
It appears that you copied the content of the pendulum_msgs
package into the demos/demo_nodes_msgs
folder, but you didn't modify the package name.
In ROS (1 or 2), packages should be unique.
To do so the name in the package.xml
as well as the project name in the CMakeLists.txt
need to be modified to use a new unique package name after being copied.
HTH,
PS: please use the code formatting icon (the 101010 icon) to format code and error messages in the future for readability
Asked by marguedas on 2018-05-28 17:02:54 UTC
Comments
changed the package. Now when i try to build the project, nothing happens but on the console it says : CDT Global Build Console
I guess i havnt configured something correctly as my functions for the rclcpp library are not getting resolved
Asked by aks on 2018-05-29 09:59:28 UTC
I have another question regarding installation. In the installation guide, it says Close eclipse-IDE and open it from the shell we sourced all the above scripts
But if i try to write eclipse
on the shell, it says eclipse npt installed. and thus i reopen it again by clicking on the icon.
Asked by aks on 2018-05-29 10:30:53 UTC
To set the environment variables, it says env>/tmp/out
and then source the local_setup.bash
but the fact is that local_setup.bash
file is in the install folder which is generated once we build the project. How can i source the local_setup file if there isnt one ? @marguedas
Asked by aks on 2018-05-29 10:42:27 UTC
@gvdhoorn @dirkthomas @mjcarroll do you have any idea regarding this ?
Asked by aks on 2018-05-29 10:49:26 UTC
Enter the full path on console to where eclipse is located, e.g. run "/home/user/eclipse/eclipse&". If you enter the environemnt variables which you get with the "diff /tmp/out /tmp/out1" command into eclipse, then you should not need to start eclipse from console again.
Asked by inflo on 2018-06-03 06:56:03 UTC
Comments