Skip to content

Commit 868e36f

Browse files
authored
Use UNUSED macro from RCLC (#10)
* Use UNUSED macro from RCLC * Fix * Update
1 parent 25d4252 commit 868e36f

File tree

7 files changed

+52
-13
lines changed

7 files changed

+52
-13
lines changed

available_ros2_types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ test_interface_files/Arrays.msg
178178
test_interface_files/MultiNested.msg
179179
test_interface_files/UnboundedSequences.msg
180180
test_interface_files/BoundedSequences.msg
181+
tf2_msgs/FrameGraph.srv
182+
tf2_msgs/TFMessage.msg
183+
tf2_msgs/TF2Error.msg
181184
example_interfaces/SetBool.srv
182185
example_interfaces/AddTwoInts.srv
183186
example_interfaces/Trigger.srv
@@ -210,6 +213,3 @@ example_interfaces/UInt8MultiArray.msg
210213
example_interfaces/Int16MultiArray.msg
211214
example_interfaces/UInt32MultiArray.msg
212215
example_interfaces/Float32MultiArray.msg
213-
tf2_msgs/FrameGraph.srv
214-
tf2_msgs/TFMessage.msg
215-
tf2_msgs/TF2Error.msg

built_packages

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
https://github.com/ros2/rosidl.git 6b62aa413af01a1455d3e0e731165ac9f27b6904
3+
https://github.com/ros2/rmw_implementation.git 395fdbc0ccaf566b39761a03f00c5ef79d018c98
4+
https://github.com/ros2/unique_identifier_msgs.git ae98763a8f3367b36c71f58c88579447158058a7
5+
https://github.com/ros2/common_interfaces.git ac4c0181041a00a45372064c7705e5124ea53b37
6+
https://github.com/ros2/libyaml_vendor.git 50546eff5f0146c027d63d7e2e473c9956e2eabf
7+
https://github.com/ros2/rcl_interfaces.git 8244fab1597ca8c5f72dc9024f019b878920699b
8+
https://github.com/ros2/rosidl_dds.git e88b1d0e62a2dca0788142cf1fb266a3a3c3d7dc
9+
https://github.com/ros2/test_interface_files.git c4d710e3394ad09a71a257f5490688653fb441b3
10+
https://github.com/ros2/rcl.git 90906259824a385ed0532c06de6f074d1c0a8656
11+
https://github.com/ros2/tinydir_vendor.git f1ee71b2fb02b24ee40123a905b16922938ca80a
12+
https://github.com/ros2/example_interfaces.git 5e6f2e03a4dc6383383fe107fe0fa8f7019d23cb
13+
https://github.com/ros2/rmw.git 1abd01bc2dc94737854158161d7ed46516f7ccd0
14+
https://github.com/ros2/rosidl_defaults.git 0a7c99c3c350146b044cb13f4885877d82c954e5
15+
https://github.com/ros2/rcl_logging.git 00fa3be7db0d0c92fe69c53be6b5d711f8fc999e
16+
https://github.com/ros2/rcpputils.git c9ca530f94e91a9bf6730fa404e894d57421749e
17+
https://github.com/eProsima/micro-CDR.git 6c9a88f122565d4c6e768ceae802c32e4a2ee836
18+
https://github.com/eProsima/Micro-XRCE-DDS-Client.git c6b9faa117cc027062972bb5b9347576c82d4b76
19+
https://github.com/micro-ROS/rclc 443b5c40c022321b9f4a3b72d69eefc90edce6b4
20+
https://github.com/micro-ROS/rcl 20e2496ddc846cdda38d25c1c284b23e24735230
21+
https://github.com/micro-ROS/rmw-microxrcedds.git b969cca2fa1a7d5e18e87996b9b82bef59837801
22+
https://github.com/micro-ROS/rcutils be853df53c3b7bf2188010e4bbeab7bc64d5f169
23+
https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing d11b87737245b8456bbada44dfa7b1d670b1c4d0
24+
https://github.com/micro-ROS/rosidl_typesupport.git a551397fa40385f88c325e5de6e75393877c8a72
25+
https://github.com/micro-ROS/rosidl_typesupport_microxrcedds.git 6cb7eaf4b633e037d1efe9f89416549c44cba2e6
26+
https://github.com/ros2/ament_cmake_ros.git bcf94994adf196d43ccb26fb1ac398b13f733908
27+
https://github.com/ament/ament_lint.git 3c48c41924c94579f473dd99e6b53969753fcb47
28+
https://github.com/ament/ament_package.git 4b2c182fb394e60161b7bddc62696485f7148ceb
29+
https://github.com/ament/ament_cmake.git 247c34a4121cb86a6736d94e8ec858d1dff44e7a
30+
https://github.com/ament/googletest.git 2ba0f63751cd94815a9aff30f85579fedc7f0e16
31+
https://github.com/ament/ament_index.git ae8b7a3998fe9c1b6fa5b55cf5054562cd2a1eb7
32+
https://github.com/ament/uncrustify_vendor.git 0291bc988c45846400aca50cb973bf04a4de3d56

examples/micro-ros_publisher/micro-ros_publisher.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void error_loop(){
3131

3232
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
3333
{
34-
UNUSED(last_call_time);
34+
RCLC_UNUSED(last_call_time);
3535
if (timer != NULL) {
3636
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
3737
msg.data++;

examples/micro-ros_tf_publisher/micro-ros_tf_publisher.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ void error_loop(){
5454

5555
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
5656
{
57-
UNUSED(last_call_time);
58-
UNUSED(timer);
57+
RCLC_UNUSED(last_call_time);
58+
RCLC_UNUSED(timer);
5959
}
6060

6161
void setup() {

extras/library_generation/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ WORKDIR uros_ws
55
RUN git clone https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build \
66
&& . /opt/ros/$ROS_DISTRO/setup.sh \
77
&& apt update \
8-
&& apt install -y python3-pip \
8+
&& apt install -y python3-pip wget\
99
&& rosdep update \
1010
&& rosdep install --from-paths src --ignore-src -y \
1111
&& colcon build \
1212
&& . install/local_setup.sh \
13-
&& ros2 run micro_ros_setup create_firmware_ws.sh generate_lib \
1413
&& rm -rf log/ build/ src/* \
1514
&& rm -rf /var/lib/apt/lists/* \
1615
&& wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2 \

extras/library_generation/library_generation.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#!/bin/bash
22

3+
apt update
4+
35
cd /uros_ws
46

7+
source /opt/ros/$ROS_DISTRO/setup.bash
8+
source install/local_setup.bash
9+
10+
ros2 run micro_ros_setup create_firmware_ws.sh generate_lib
11+
512
######## Copying Arduino placeholders XRCE transport ########
613

714
cp /arduino_project/extras/library_generation/arduino_xrce_transports/serial_transport_external.c firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/src/c/profile/transport/serial/
@@ -19,9 +26,6 @@ popd > /dev/null
1926
######## Clean and source ########
2027
find /arduino_project/src/ ! -name micro_ros_arduino.h ! -name *.c ! -name *.c.in -delete
2128

22-
source /opt/ros/$ROS_DISTRO/setup.bash
23-
source install/local_setup.bash
24-
2529
######## Build for OpenCR ########
2630
rm -rf firmware/build
2731

@@ -56,4 +60,8 @@ mkdir -p /arduino_project/src/mk20dx256
5660
cp -R firmware/build/libmicroros.a /arduino_project/src/mk20dx256/libmicroros.a
5761

5862
######## Generate extra files ########
59-
find firmware/mcu_ws/ros2 \( -name "*.srv" -o -name "*.msg" \) | awk -F"/" '{print $(NF-2)"/"$NF}' > /arduino_project/available_ros2_types
63+
find firmware/mcu_ws/ros2 \( -name "*.srv" -o -name "*.msg" \) | awk -F"/" '{print $(NF-2)"/"$NF}' > /arduino_project/available_ros2_types
64+
65+
cd firmware
66+
echo "" > /arduino_project/built_packages
67+
for f in $(find $(pwd) -name .git -type d); do pushd $f > /dev/null; echo $(git config --get remote.origin.url) $(git rev-parse HEAD) >> /arduino_project/built_packages; popd > /dev/null; done;

src/rclc/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ typedef struct
4949
} while (0)
5050
#endif
5151

52-
#define UNUSED(x) (void)x
52+
#define RCLC_UNUSED(x) (void)x
5353

5454
#if __cplusplus
5555
}

0 commit comments

Comments
 (0)