Difference between revisions of "ROS2"

From ElphelWiki
Jump to: navigation, search
(Created page with "==GitHub== https://github.com/bmwcarit/meta-ros.git ==ROS1== * Won't build ==ROS2== * Add path to bblayers.conf * Add to "IMAGE_INSTALL_append" of core-image-elphel393.bb:...")
 
(ROS2)
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
==GitHub==
+
==<font color='blue'>GitHub</font>==
 
https://github.com/bmwcarit/meta-ros.git
 
https://github.com/bmwcarit/meta-ros.git
  
 +
==<font color='blue'>ROS1</font>==
  
==ROS1==
+
===Build===
 
* Won't build
 
* Won't build
 +
===Work===
 +
* Won't work
  
==ROS2==
+
==<font color='blue'>ROS2</font>==
 +
 
 +
===Build===
 
* Add path to bblayers.conf
 
* Add path to bblayers.conf
 
* Add to "IMAGE_INSTALL_append" of core-image-elphel393.bb:
 
* Add to "IMAGE_INSTALL_append" of core-image-elphel393.bb:
Line 13: Line 18:
 
  ros2msg \
 
  ros2msg \
 
  ros2run \
 
  ros2run \
 +
 +
'''Notes:'''
 +
* Is this a required minimum?
 +
* '''ROS_USE_PYTHON3 = "yes"''' results in errors?
 +
===Work===
 +
====1. Test Talker and Listener====
 +
* SSH session 1:
 +
root@elphel393:~# export AMENT_PREFIX_PATH=/usr
 +
root@elphel393:~# ros2 run demo_nodes_cpp talker
 +
* SSH session 2:
 +
root@elphel393:~# export AMENT_PREFIX_PATH=/usr
 +
root@elphel393:~# ros2 run demo_nodes_cpp listener
 +
 +
'''Notes:'''
 +
* If AMENT_PREFIX_PATH is not set then:
 +
<font size='1'>Traceback (most recent call last):
 +
  File "/usr/bin/ros2", line 11, in <module>
 +
    load_entry_point('ros2cli==0.4.0', 'console_scripts', 'ros2')()
 +
  File "/usr/lib/python3.5/site-packages/ros2cli/cli.py", line 64, in main
 +
    rc = extension.main(parser=parser, args=args)
 +
  File "/usr/lib/python3.5/site-packages/ros2run/command/run.py", line 59, in main
 +
    executable_name=args.executable_name)
 +
  File "/usr/lib/python3.5/site-packages/ros2run/api/__init__.py", line 30, in get_executable_path
 +
    paths = get_executable_paths(package_name=package_name)
 +
  File "/usr/lib/python3.5/site-packages/ros2pkg/api/__init__.py", line 41, in get_executable_paths
 +
    prefix_path = get_prefix_path(package_name)
 +
  File "/usr/lib/python3.5/site-packages/ros2pkg/api/__init__.py", line 34, in get_prefix_path
 +
    prefix_path = get_package_prefix(package_name)
 +
  File "/usr/lib/python3.5/site-packages/ament_index_python/packages.py", line 49, in get_package_prefix
 +
    content, package_prefix = get_resource('packages', package_name)
 +
  File "/usr/lib/python3.5/site-packages/ament_index_python/resources.py", line 37, in get_resource
 +
    for path in get_search_paths():
 +
  File "/usr/lib/python3.5/site-packages/ament_index_python/search_paths.py", line 30, in get_search_paths
 +
    "Environment variable '{}' is not set or empty".format(AMENT_PREFIX_PATH_ENV_VAR))
 +
<font color='red'>'''OSError: Environment variable 'AMENT_PREFIX_PATH' is not set or empty'''</font></font>
 +
 +
====2. Available packages====
 +
* SSH session:
 +
root@elphel393:~# export AMENT_PREFIX_PATH=/usr
 +
root@elphel393:~# ros2 pkg list
 +
<font size='1'>builtin_interfaces
 +
demo_nodes_cpp
 +
example_interfaces
 +
geometry_msgs
 +
rcl
 +
rcl_interfaces
 +
rclcpp
 +
rclpy
 +
rcutils
 +
rmw
 +
rmw_fastrtps_cpp
 +
rosidl_cmake
 +
rosidl_generator_c
 +
rosidl_generator_cpp
 +
rosidl_parser
 +
rosidl_typesupport_interface
 +
rosidl_typesupport_introspection_c
 +
rosidl_typesupport_introspection_cpp
 +
sensor_msgs
 +
</font>

Revision as of 13:05, 4 December 2018

GitHub

https://github.com/bmwcarit/meta-ros.git

ROS1

Build

  • Won't build

Work

  • Won't work

ROS2

Build

  • Add path to bblayers.conf
  • Add to "IMAGE_INSTALL_append" of core-image-elphel393.bb:
ros2-demo-nodes-cpp \
ros2topic \
ros2msg \
ros2run \

Notes:

  • Is this a required minimum?
  • ROS_USE_PYTHON3 = "yes" results in errors?

Work

1. Test Talker and Listener

  • SSH session 1:
root@elphel393:~# export AMENT_PREFIX_PATH=/usr
root@elphel393:~# ros2 run demo_nodes_cpp talker
  • SSH session 2:
root@elphel393:~# export AMENT_PREFIX_PATH=/usr
root@elphel393:~# ros2 run demo_nodes_cpp listener

Notes:

  • If AMENT_PREFIX_PATH is not set then:
Traceback (most recent call last):
  File "/usr/bin/ros2", line 11, in <module>
    load_entry_point('ros2cli==0.4.0', 'console_scripts', 'ros2')()
  File "/usr/lib/python3.5/site-packages/ros2cli/cli.py", line 64, in main
    rc = extension.main(parser=parser, args=args)
  File "/usr/lib/python3.5/site-packages/ros2run/command/run.py", line 59, in main
    executable_name=args.executable_name)
  File "/usr/lib/python3.5/site-packages/ros2run/api/__init__.py", line 30, in get_executable_path
    paths = get_executable_paths(package_name=package_name)
  File "/usr/lib/python3.5/site-packages/ros2pkg/api/__init__.py", line 41, in get_executable_paths
    prefix_path = get_prefix_path(package_name)
  File "/usr/lib/python3.5/site-packages/ros2pkg/api/__init__.py", line 34, in get_prefix_path
    prefix_path = get_package_prefix(package_name)
  File "/usr/lib/python3.5/site-packages/ament_index_python/packages.py", line 49, in get_package_prefix
    content, package_prefix = get_resource('packages', package_name)
  File "/usr/lib/python3.5/site-packages/ament_index_python/resources.py", line 37, in get_resource
    for path in get_search_paths():
  File "/usr/lib/python3.5/site-packages/ament_index_python/search_paths.py", line 30, in get_search_paths
    "Environment variable '{}' is not set or empty".format(AMENT_PREFIX_PATH_ENV_VAR))
OSError: Environment variable 'AMENT_PREFIX_PATH' is not set or empty

2. Available packages

  • SSH session:
root@elphel393:~# export AMENT_PREFIX_PATH=/usr
root@elphel393:~# ros2 pkg list
builtin_interfaces
demo_nodes_cpp
example_interfaces
geometry_msgs
rcl
rcl_interfaces
rclcpp
rclpy
rcutils
rmw
rmw_fastrtps_cpp
rosidl_cmake
rosidl_generator_c
rosidl_generator_cpp
rosidl_parser
rosidl_typesupport_interface
rosidl_typesupport_introspection_c
rosidl_typesupport_introspection_cpp
sensor_msgs