Skip to content

Add sleep functionality#64

Merged
JanStaschulat merged 1 commit intomasterfrom
feature/rclc_sleep_functionality
Mar 26, 2021
Merged

Add sleep functionality#64
JanStaschulat merged 1 commit intomasterfrom
feature/rclc_sleep_functionality

Conversation

@pablogs9
Copy link
Copy Markdown
Member

@pablogs9 pablogs9 commented Mar 25, 2021

I have had some incompatibility problems because we are forcing users to #include <unistd.h> in executor.h and in some cross-compiled environments, this POSIX include is causing incompatibility errors.

Are you ok with including this functionality as part of the RCLC library?

@pablogs9 pablogs9 force-pushed the feature/rclc_sleep_functionality branch from bf798cd to 1d61902 Compare March 25, 2021 08:41
@pablogs9 pablogs9 requested a review from JanStaschulat March 25, 2021 08:42
@pablogs9
Copy link
Copy Markdown
Member Author

BTW @JanStaschulat are you ok with forcing the policy of the PR to be always "Squash and merge" instead of just "Merge" to avoid having a tree like this one:

image

IMO in this image foxy and master are just one "feature" away which should be just one commit (windows support in this case), but there are a lot of commits.

What do you think?

@pablogs9
Copy link
Copy Markdown
Member Author

Friendy ping @ralph-lange @JanStaschulat @norro

@JanStaschulat
Copy link
Copy Markdown
Contributor

JanStaschulat commented Mar 26, 2021

"Are you ok with including this functionality as part of the RCLC library?"

@pablogs9 thanks for creating a file for the sleep function. Ralph suggested to create a pull request to rclutils instead to add a sleep function there.

Before merging, though, @norro please fix the error in rclc_lifecycle for rolling or create another issue, in which you resolve this.

/tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c:50:5: warning: passing argument 9 of ‘rcl_lifecycle_state_machine_init’ makes pointer from integer without a cast [-Wint-conversion]
01:42:25    50 |     true,
01:42:25       |     ^~~~
01:42:25       |     |
01:42:25       |     int
01:42:25 In file included from /tmp/ws/src/rclc/rclc_lifecycle/include/rclc_lifecycle/rclc_lifecycle.h:24,
01:42:25                  from /tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c:17:
01:42:25 /opt/ros/rolling/include/rcl_lifecycle/rcl_lifecycle.h:253:49: note: expected ‘const rcl_lifecycle_state_machine_options_t *’ {aka ‘const struct rcl_lifecycle_state_machine_options_t *’} but argument is of type ‘int’
01:42:25   253 |   const rcl_lifecycle_state_machine_options_t * state_machine_options);
01:42:25       |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
01:42:25 /tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c:41:23: error: too many arguments to function ‘rcl_lifecycle_state_machine_init’
01:42:25    41 |   rcl_ret_t rcl_ret = rcl_lifecycle_state_machine_init(
01:42:25       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01:42:25 In file included from /tmp/ws/src/rclc/rclc_lifecycle/include/rclc_lifecycle/rclc_lifecycle.h:24,
01:42:25                  from /tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c:17:
01:42:25 /opt/ros/rolling/include/rcl_lifecycle/rcl_lifecycle.h:244:1: note: declared here
01:42:25   244 | rcl_lifecycle_state_machine_init(
01:42:25       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01:42:25 /tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c: In function ‘rcl_lifecycle_node_fini’:
01:42:25 /tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c:233:13: error: too many arguments to function ‘rcl_lifecycle_state_machine_fini’
01:42:25   233 |   rcl_ret = rcl_lifecycle_state_machine_fini(
01:42:25       |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01:42:25 In file included from /tmp/ws/src/rclc/rclc_lifecycle/include/rclc_lifecycle/rclc_lifecycle.h:24,
01:42:25                  from /tmp/ws/src/rclc/rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c:17:
01:42:25 /opt/ros/rolling/include/rcl_lifecycle/rcl_lifecycle.h:278:1: note: declared here
01:42:25   278 | rcl_lifecycle_state_machine_fini(
01:42:25       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01:42:25 make[2]: *** [CMakeFiles/rclc_lifecycle.dir/build.make:63: CMakeFiles/rclc_lifecycle.dir/src/rclc_lifecycle/rclc_lifecycle.c.o] Error 1
01:42:25 make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/rclc_lifecycle.dir/all] Error 2
01:42:25 make: *** [Makefile:141: all] Error 2
01:42:25 ---

@pablogs9
Copy link
Copy Markdown
Member Author

#66 is the fix.

@norro
Copy link
Copy Markdown
Collaborator

norro commented Mar 26, 2021

Before merging, though, @norro please fix the error in rclc_lifecycle for rolling or create another issue, in which you resolve this.

@JanStaschulat These errors are fixed separately with #66

@JanStaschulat
Copy link
Copy Markdown
Contributor

"BTW @JanStaschulat are you ok with forcing the policy of the PR to be always "Squash and merge" instead of just "Merge" to avoid having a tree like this one:"

Yes, I agree. 'squash and merge' could be the default option.

@JanStaschulat JanStaschulat merged commit ecf806d into master Mar 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the feature/rclc_sleep_functionality branch March 26, 2021 09:25
@pablogs9
Copy link
Copy Markdown
Member Author

Updated default properties:
image

JanStaschulat pushed a commit that referenced this pull request Mar 26, 2021
provide compatability for sleep function in Windows- and POSIX- operating systems.
JanStaschulat pushed a commit that referenced this pull request Mar 26, 2021
provide compatability for sleep function in Windows- and POSIX- operating systems.

Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com>
pablogs9 added a commit that referenced this pull request Apr 29, 2021
provide compatability for sleep function in Windows- and POSIX- operating systems.
pablogs9 added a commit that referenced this pull request Apr 30, 2021
provide compatability for sleep function in Windows- and POSIX- operating systems.
BrettRD pushed a commit to BrettRD/rclc that referenced this pull request Jul 5, 2021
provide compatability for sleep function in Windows- and POSIX- operating systems.

Signed-off-by: BrettRD <brettrd@brettrd.com>
MiguelCompany pushed a commit to eProsima/rclc that referenced this pull request Jun 6, 2023
* Updated changelog, version 0.1.6

Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com>

* corrected changelog of rclc

Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com>

* increased version in package.xml files

Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants