Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ if(PICOROS_BUILD_EXAMPLES)
thirdparty/Micro-CDR/include
)

add_executable(srv_add2ints examples/srv_add2ints.c ${EXAMPLE_SRC})
target_include_directories(srv_add2ints PUBLIC ${EXAMPLE_INCLUDE})
target_link_libraries(srv_add2ints PRIVATE ${EXAMPLE_LIBS})
add_executable(srv_server_add2ints examples/srv_server_add2ints.c ${EXAMPLE_SRC})
target_include_directories(srv_server_add2ints PUBLIC ${EXAMPLE_INCLUDE})
target_link_libraries(srv_server_add2ints PRIVATE ${EXAMPLE_LIBS})

add_executable(srv_client_add2ints examples/srv_client_add2ints.c ${EXAMPLE_SRC})
target_include_directories(srv_client_add2ints PUBLIC ${EXAMPLE_INCLUDE})
target_link_libraries(srv_client_add2ints PRIVATE ${EXAMPLE_LIBS})

add_executable(talker examples/talker.c ${EXAMPLE_SRC})
target_include_directories(talker PUBLIC ${EXAMPLE_INCLUDE})
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project settings
PROJECT_NAME = "Pico-ROS"
PROJECT_NUMBER = $(shell cat ../version.txt)
PROJECT_NUMBER = ""
PROJECT_BRIEF = "A lightweight ROS client implementation for resource-constrained devices"
OUTPUT_DIRECTORY = generated
CREATE_SUBDIRS = YES
Expand Down
54 changes: 27 additions & 27 deletions examples/example_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@
#define SRV_LIST(SRV, REQUEST, REPLY, FIELD, ARRAY, SEQUENCE) \
SRV(srv_CancelGoal, \
"action_msgs::srv::dds_::CancelGoal", \
"3d3c84653c1f96918086887e1dcb236faec88b81a5b14fd4cf4840065bcdf8af", \
"573d8b0a534451d7bc2ac8c5ffde8ac14b8593b7001175d0cd6516dcbeb8689a", \
REQUEST( \
FIELD(ros_GoalInfo, goal_info) \
), \
Expand All @@ -1098,7 +1098,7 @@
) \
SRV(srv_AddTwoInts, \
"example_interfaces::srv::dds_::AddTwoInts", \
"000c5fd92d6b2e1a05949348f584d6d652adea1e92d691792011ac2273508302", \
"e118de6bf5eeb66a2491b5bda11202e7b68f198d6f67922cf30364858239c81a", \
REQUEST( \
FIELD(int64_t, a) \
FIELD(int64_t, b) \
Expand All @@ -1109,7 +1109,7 @@
) \
SRV(srv_SetBool, \
"std_srvs::srv::dds_::SetBool", \
"c62fbb99d94e1b25e8ef9e109f9581956bb1b3361a45a4e5810c36a90d29932e", \
"abe9e4bb6b41b40e6789712c00ec8871923e089af3f667a79992a428cff2da0a", \
REQUEST( \
FIELD(bool, data) \
), \
Expand All @@ -1120,7 +1120,7 @@
) \
SRV(srv_Trigger, \
"std_srvs::srv::dds_::Trigger", \
"d010825374ce8918e72bfd826c82603e60f45419e932ea976f807b74a863a199", \
"eeff2cd6fa5ad9d27cdf4dec64818317839b62f212a91e6b5304b634b2062c5f", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1131,7 +1131,7 @@
) \
SRV(srv_ChangeState, \
"lifecycle_msgs::srv::dds_::ChangeState", \
"d74c6f524e14cade7b67e7297190360ed749264af300524fc1456f27cc2a553a", \
"356fe34f0475a43acf54542013af4167b0e729f77ea22ffb045c6ad8e20668e5", \
REQUEST( \
FIELD(ros_Transition, transition) \
), \
Expand All @@ -1141,7 +1141,7 @@
) \
SRV(srv_GetAvailableStates, \
"lifecycle_msgs::srv::dds_::GetAvailableStates", \
"c2c0c12de6023822f284929577d4ca2862e0501150010966e8a90b632e4424de", \
"00a07d79d2207d71e81a8cbc1880e5d924cc16d4688ea8e8e06e443dc8f8aa1d", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1151,7 +1151,7 @@
) \
SRV(srv_GetAvailableTransitions, \
"lifecycle_msgs::srv::dds_::GetAvailableTransitions", \
"52a73c0b5d7489bee0df6ddb0aec45c41289d223ff225b58fe11d859ac8109a6", \
"59b7ecefce0982a8a844b9f2c4f14764c1c4543cc55e72924e2aa4adad83e9bc", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1161,7 +1161,7 @@
) \
SRV(srv_GetState, \
"lifecycle_msgs::srv::dds_::GetState", \
"77a9c844e7975f15bc2221e8bbebafc4d118afb78c7f7071eef91f83f940f2f6", \
"800a0a5aae599782b02932de0caf563f6dc4e7e94b794eadde075ba2cbef9795", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1171,7 +1171,7 @@
) \
SRV(srv_GetLoggerLevels, \
"rcl_interfaces::srv::dds_::GetLoggerLevels", \
"490ace424a5f5b14cb4e1e95030d7fe366d8df0fd9fe4d03b44d6009504fd2cc", \
"03bf1bebd0d6514c7ed0ba7c5e08dc9f2f39c759fe99e1e30ea4157d7674f72d", \
REQUEST( \
SEQUENCE(rstring, names) \
), \
Expand All @@ -1181,7 +1181,7 @@
) \
SRV(srv_GetParameterTypes, \
"rcl_interfaces::srv::dds_::GetParameterTypes", \
"87d7ec5ef545d4daa289d500025d31fb2437bc8b8365ca367161c4dac4be33fd", \
"da199c878688b3e530bdfe3ca8f74cb9fa0c303101e980a9e8f260e25e1c80ca", \
REQUEST( \
SEQUENCE(rstring, names) \
), \
Expand All @@ -1191,7 +1191,7 @@
) \
SRV(srv_GetParameters, \
"rcl_interfaces::srv::dds_::GetParameters", \
"135a9e1c3d7cebef792f6687d7ddf99949b21a0bd9a320d863a9110a3f5cf4d6", \
"bf9803d5c74cf989a5de3e0c2e99444599a627c7ff75f97b8c05b01003675cbc", \
REQUEST( \
SEQUENCE(rstring, names) \
), \
Expand All @@ -1201,7 +1201,7 @@
) \
SRV(srv_ListParameters, \
"rcl_interfaces::srv::dds_::ListParameters", \
"a1b0b5d6b967a5b8ac5bc8563c3ea678f349e312a6a4967227c5a96bc5ce38df", \
"3e6062bfbb27bfb8730d4cef2558221f51a11646d78e7bb30a1e83afac3aad9d", \
REQUEST( \
SEQUENCE(rstring, prefixes) \
FIELD(uint64_t, depth) \
Expand All @@ -1212,7 +1212,7 @@
) \
SRV(srv_SetLoggerLevels, \
"rcl_interfaces::srv::dds_::SetLoggerLevels", \
"4e7768e0f4c749205f35bc05449f83fad18c42de52c16b1934d66c2f68ffd862", \
"3ff86cb4e91fbf9abae15c234ecc874448de6ece8e193401c077cf116e4f6d78", \
REQUEST( \
SEQUENCE(ros_LoggerLevel, levels) \
), \
Expand All @@ -1222,7 +1222,7 @@
) \
SRV(srv_SetParameters, \
"rcl_interfaces::srv::dds_::SetParameters", \
"130d46386b7e84ea9ecf60608a4d83cbe5e5cb7c6cc5b712b7a4e3a6c254e932", \
"56eed9a67e169f9cb6c1f987bc88f868c14a8fc9f743a263bc734c154015d7e0", \
REQUEST( \
SEQUENCE(ros_Parameter, parameters) \
), \
Expand All @@ -1232,7 +1232,7 @@
) \
SRV(srv_SetParametersAtomically, \
"rcl_interfaces::srv::dds_::SetParametersAtomically", \
"db0bd950ed5ed867a0e90b225e44dea382d762c0762ff3e0ee842190042a59e5", \
"0e192ef259c07fc3c07a13191d27002222e65e00ccec653ca05e856f79285fcd", \
REQUEST( \
SEQUENCE(ros_Parameter, parameters) \
), \
Expand All @@ -1242,7 +1242,7 @@
) \
SRV(srv_ListNodes, \
"composition_interfaces::srv::dds_::ListNodes", \
"57c879a1825b3fa15fd58e70d2e73223af6b9c45c7ae104cc107e73464d3a724", \
"13f30d73a74c844ee4bacf78f3680f08777cad137f10fbd6a648544cc7b59d2a", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1253,7 +1253,7 @@
) \
SRV(srv_LoadNode, \
"composition_interfaces::srv::dds_::LoadNode", \
"7d3496175f54f92d652547e144c9b2a3b22afd604f84ed70adfcd1cfe35801b5", \
"2e521ef6066fba6d7fc3a3b175d486709f01b4d738d9a59188858546fc8e5acd", \
REQUEST( \
FIELD(rstring, package_name) \
FIELD(rstring, plugin_name) \
Expand All @@ -1273,7 +1273,7 @@
) \
SRV(srv_UnloadNode, \
"composition_interfaces::srv::dds_::UnloadNode", \
"95d5cfc357956740190c7685ac868d9c7c98dcb8c1416aae8eaa351422074e12", \
"dce562f83adc735ddcfe9dfb927b89293d4dd0fe2b8fc91e772fb83e970a43b0", \
REQUEST( \
FIELD(uint64_t, unique_id) \
), \
Expand All @@ -1284,7 +1284,7 @@
) \
SRV(srv_AddDiagnostics, \
"diagnostic_msgs::srv::dds_::AddDiagnostics", \
"e0b6572a07c2b3ca2c4f2acf742297661f6ceb50f5baa4f9305b6094cf950146", \
"6b91084c9f8bffd9b0c1f6883e0e8e491a831f4fc6c6aec77a4efaf3f1ea90b5", \
REQUEST( \
FIELD(rstring, load_namespace) \
), \
Expand All @@ -1295,7 +1295,7 @@
) \
SRV(srv_SelfTest, \
"diagnostic_msgs::srv::dds_::SelfTest", \
"3bb94b497e74e9beed2dddc7212d3ae596696d30413bd1550fe932fc20efb8a4", \
"df1e4e54a814a16ccc77471e9239618d46818e8d0e3b45ad6f8c34c6e2abfef6", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1307,7 +1307,7 @@
) \
SRV(srv_GetMap, \
"nav_msgs::srv::dds_::GetMap", \
"b531e302f1bd6a81f8a5e03453266c378b1f711b4296000c1c0f53a40e00a7c4", \
"c8ae77c9995b3554b5ba80e4d4d443f970ac65143102a1d893ec24fc07b31147", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1317,7 +1317,7 @@
) \
SRV(srv_GetPlan, \
"nav_msgs::srv::dds_::GetPlan", \
"f1bb9fab287948b4432a4a7e4f529e7ea6269cd06269ee8fcb911fdb4acd23c3", \
"234f7aff100f5edb8150366601687b027bcdc253db47decb88fff846193fe5e8", \
REQUEST( \
FIELD(ros_PoseStamped, start) \
FIELD(ros_PoseStamped, goal) \
Expand All @@ -1329,7 +1329,7 @@
) \
SRV(srv_LoadMap, \
"nav_msgs::srv::dds_::LoadMap", \
"0f8fe3aac433c977d7c2f8b57ab1c3a17677e24880d76919b69e4208e99f5132", \
"1a192ac56c40fed2767dac26f0b371785372276bd465c902676d2dca135aae5a", \
REQUEST( \
FIELD(rstring, map_url) \
), \
Expand All @@ -1340,7 +1340,7 @@
) \
SRV(srv_SetMap, \
"nav_msgs::srv::dds_::SetMap", \
"5a83a0c20af4d79248fc3287524bf358b603fb5a05818b5ec85b50fa6e5d0266", \
"5e11a5b2ca53d8ae85b666a019f16c9904ebc787828f1f566c4e048a1ddedfb4", \
REQUEST( \
FIELD(ros_OccupancyGrid, map) \
FIELD(ros_PoseWithCovarianceStamped, initial_pose) \
Expand All @@ -1351,7 +1351,7 @@
) \
SRV(srv_SetCameraInfo, \
"sensor_msgs::srv::dds_::SetCameraInfo", \
"27dc5497730fdb6930e66cb879c210e31a83022acc5bbc999f24f55286029f87", \
"a10cca5d33dc637c8d49db50ab288701a3592bb9cd854f2f16a0659613b68984", \
REQUEST( \
FIELD(ros_CameraInfo, camera_info) \
), \
Expand All @@ -1362,7 +1362,7 @@
) \
SRV(srv_Empty, \
"std_srvs::srv::dds_::Empty", \
"458eaf200a3f63d9cc53d19436edebc0c140ef4c93ca75d5bd4ce19fd7759e35", \
"5888399dedec5ccc85ea6451949fd2c9f97bfdf963f9a588821639fcd31b5d19", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand All @@ -1372,7 +1372,7 @@
) \
SRV(srv_GetInteractiveMarkers, \
"visualization_msgs::srv::dds_::GetInteractiveMarkers", \
"7fa7e0830e3cbe9c15927a29fdc09fedcd9a86757e375f29ce6b0744cb0b6905", \
"bfdfaa861f4a8422b4ec3bd02c6681e4a45a83bdc2913d8facdf923d8ad1376a", \
REQUEST( \
FIELD(uint8_t, empty) \
), \
Expand Down
8 changes: 4 additions & 4 deletions examples/odometry_listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @file odometry_listener.c
* @brief Example odometry subscriber node for picoros
* @date 2025-May-27
*
*
* @details This example demonstrates a ROS subscriber node that listens to
* odometry messages on the "odom" topic and prints the pose data.
*
*
* @copyright Copyright (c) 2025 Ubiquity Robotics
*******************************************************************************/

Expand All @@ -27,7 +27,7 @@ void odometry_callback(uint8_t* rx_data, size_t data_len);
// Example Subscriber
picoros_subscriber_t sub_odo = {
.topic = {
.name = "odom",
.name = "robot/odometry",
.type = ROSTYPE_NAME(ros_Odometry),
.rihs_hash = ROSTYPE_HASH(ros_Odometry),
},
Expand All @@ -36,7 +36,7 @@ picoros_subscriber_t sub_odo = {

// Example node
picoros_node_t node = {
.name = "listener",
.name = "picoros",
};

void odometry_callback(uint8_t* rx_data, size_t data_len){
Expand Down
10 changes: 5 additions & 5 deletions examples/odometry_publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* @file odometry_publisher.c
* @brief Example odometry publisher node for picoros
* @date 2025-May-27
*
*
* @details This example demonstrates a ROS publisher node that publishes
* simulated odometry messages on the "odom" topic.
*
*
* @copyright Copyright (c) 2025 Ubiquity Robotics
*******************************************************************************/

#include <stdio.h>
#include <stdint.h>
#include "picoros.h"
Expand All @@ -24,15 +24,15 @@ extern int picoros_parse_args(int argc, char **argv, picoros_interface_t* ifx);
// Example Publisher
picoros_publisher_t pub_odo = {
.topic = {
.name = "odom",
.name = "robot/odometry",
.type = ROSTYPE_NAME(ros_Odometry),
.rihs_hash = ROSTYPE_HASH(ros_Odometry),
},
};

// Example node
picoros_node_t node = {
.name = "talker",
.name = "picoros",
};

// Buffer for publication, used from this thread
Expand Down
Loading