osrf / ros2_test_cases

Tracking of tests to be performed on a ROS 2 release
16 stars 4 forks source link

Check Lifecyle node py #1224

Closed marcoag closed 4 months ago

marcoag commented 4 months ago

Configuration

Links

Process

Check listener and talker

Actions

# StdIn - terminal 1
ros2 run lifecycle_py lifecycle_talker
# StdIn - terminal 2
ros2 lifecycle nodes
# StdIn - terminal 2
ros2 lifecycle set /lc_talker 1
# StdIn - terminal 2
ros2 lifecycle set /lc_talker 3

Expected Results

# StdOut - terminal 1
[INFO] [1680583079.479073069] [lc_talker]: on_configure() is called.
[INFO] [1680583080.439717509] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
# StdOut - terminal 2
/lc_talker
# StdOut - terminal 2
Transitioning successful
# StdOut - terminal 2
[INFO] [1680583403.113550155] [lc_talker]: on_activate() is called.
[INFO] [1680583403.439875193] [lc_talker]: Lifecycle publisher is active. Publishing: [Lifecycle HelloWorld #323]
fujitatomoya commented 4 months ago

@marcoag @clalancette this needs to be checked.

seems lifecycle_py package is missing.

root@51cdd59e1f3e:~# ros2 run lifecycle_py lifecycle_talker
Package 'lifecycle_py' not found
root@51cdd59e1f3e:~# apt-cache search lifecycle_py
root@51cdd59e1f3e:~#
clalancette commented 4 months ago

@marcoag @clalancette this needs to be checked.

seems lifecycle_py package is missing.

So the issue here is that lifecycle_py isn't part of ros-jazzy-desktop, which is why it isn't available. I have to take a look to see if that was the case in earlier versions as well, or if we should just update the test-case here to say to install that package first.

clalancette commented 4 months ago
root@51cdd59e1f3e:~# apt-cache search lifecycle_py

By the way, this didn't work because it would need to be:

# apt-cache search '.*lifecycle-py.*'

Can you confirm that returns at least ros-jazzy-lifecycle-py? Also, can you confirm that after installing the package that this test case works?

fujitatomoya commented 4 months ago

@clalancette ah, okay that is lifecycle-py not lifecycle_py (underscore).

root@51cdd59e1f3e:~# apt-cache search lifecycle-py
ros-jazzy-lifecycle-py - Package containing demos for rclpy lifecycle implementation
ros-rolling-lifecycle-py - Package containing demos for rclpy lifecycle implementation

then, after installation, that works without problem.

root@51cdd59e1f3e:~# ros2 run lifecycle_py lifecycle_talker
[INFO] [1714753669.684178197] [lc_talker]: on_configure() is called.
[INFO] [1714753670.664414702] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753671.664318830] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753672.664355767] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753673.664300851] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753674.664355375] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753675.663649163] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753676.664353769] [lc_talker]: Lifecycle publisher is inactive. Messages are not published.
[INFO] [1714753677.083596721] [lc_talker]: on_activate() is called.
[INFO] [1714753677.664418808] [lc_talker]: Lifecycle publisher is active. Publishing: [Lifecycle HelloWorld #7]
[INFO] [1714753678.664417664] [lc_talker]: Lifecycle publisher is active. Publishing: [Lifecycle HelloWorld #8]
[INFO] [1714753679.664394218] [lc_talker]: Lifecycle publisher is active. Publishing: [Lifecycle HelloWorld #9]
[INFO] [1714753680.664336255] [lc_talker]: Lifecycle publisher is active. Publishing: [Lifecycle HelloWorld #10]

root@51cdd59e1f3e:~# ros2 lifecycle nodes
/lc_talker
root@51cdd59e1f3e:~# ros2 lifecycle set /lc_talker 1
Transitioning successful
root@51cdd59e1f3e:~# ros2 lifecycle set /lc_talker 3
Transitioning successful

we can close this one.

clalancette commented 4 months ago

Thanks for testing!