ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Configuring ROS2 with Eclipse

asked 2018-05-28 11:19:44 -0500

aks gravatar image

updated 2018-05-28 17:03:48 -0500

marguedas gravatar image

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
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-28 17:02:54 -0500

marguedas gravatar image

updated 2018-05-28 17:04:51 -0500

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

edit flag offensive delete link more

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

aks gravatar image aks  ( 2018-05-29 09:59:28 -0500 )edit

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.

aks gravatar image aks  ( 2018-05-29 10:30:53 -0500 )edit

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

aks gravatar image aks  ( 2018-05-29 10:42:27 -0500 )edit

@gvdhoorn @dirkthomas @mjcarroll do you have any idea regarding this ?

aks gravatar image aks  ( 2018-05-29 10:49:26 -0500 )edit

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.

inflo gravatar image inflo  ( 2018-06-03 06:56:03 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-28 11:19:44 -0500

Seen: 500 times

Last updated: May 28 '18