lucasw / image_manip

ros image manipulation nodelets
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

ros2 version #6

Open lucasw opened 6 years ago

lucasw commented 6 years ago

Maybe some common code in libraries, but mostly everything is a thin wrapper around opencv functions already.

lucasw commented 6 years ago

Use topics instead of parameters for now.

lucasw commented 6 years ago

Need ros-bouncy-cv-bridge.

lucasw commented 6 years ago

Build just one package:

$ colcon build --packages-select image_manip2
lucasw commented 6 years ago

Seems like node isn't dying from first attempt to run it. update I think I didn't kill it and didn't realize I left the terminal window open.

lucasw commented 6 years ago

colcon started outputting this, though the build worked okay:

[3.116s] ERROR:colcon.colcon_notification.desktop_notification:Exception in desktop notification extension 'notify2': org.freedesktop.Notifications.MaxNotificationsExceeded: Exceeded maximum number of notifications
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_notification/desktop_notification/__init__.py", line 107, in notify
    title=title, message=message, icon_path=icon_path)
  File "/usr/lib/python3/dist-packages/colcon_notification/desktop_notification/notify2.py", line 50, in notify
    self._last_notification.show()
  File "/usr/lib/python3/dist-packages/notify2.py", line 188, in show
    self.timeout,  # expire_timeout
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.Notifications.MaxNotificationsExceeded: Exceeded maximum number of notifications
lucasw commented 6 years ago
ros2 run image_manip2 image_publisher `pwd`/src/image_manip/image_manip/data/mosaic.png
ros2 run image_tools showimage -t image_raw
lucasw commented 6 years ago

The catkin image_manip produces warnings in colcon, but COLCON_IGNORE causes catkin to ignore it also?

https://answers.ros.org/question/306624/ignore-package-in-colcon-but-not-catkin/

lucasw commented 6 years ago

Need ros2 launch files.

Look at https://github.com/ros2/demos/blob/master/demo_nodes_cpp/launch/services/add_two_ints.launch.py

If there is an error the launch process doesn't end

[ERROR] [launch.LaunchService]: Caught exception in launch (see debug for traceback): "package 'lmage_tools' not found, searching: [
...

Have to get the pid and kill it.

Need to remember to colcon build for every launch file edit so the file is re-installed (because there is no halfway 'devel' build ability).

$ ros2 launch image_manip2 resize_launch.py
image_manip2 dir /home/lucasw/ros/ros2_ws/install/image_manip2/share/image_manip2
[INFO] [launch]: process[image_publisher-1]: started with pid [16116]
[INFO] [launch]: process[showimage-2]: started with pid [16117]
[INFO] [launch]: process[resize-3]: started with pid [16118]
[INFO] [launch]: process[showimage-4]: started with pid [16119]
ros2 topic pub /height std_msgs/UInt16 "{data: 400}"