Skip to content

Commit 1442642

Browse files
authored
Ref #7867. Added Zephyr simulator (#128)
* Added Zephyr emulator section * Copy content * Update tutorial * Added image * Fix link * FIx link * Update agent install * Update folder tree * Update tree * Minor fixes * Update * Update * Update * Minor fixes Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update _docs/tutorials/advanced/zephyr/zephyr_emulator/index.md Co-Authored-By: Julián Bermúdez Ortega <julianbermudez@eprosima.com> Update pushd popd * Update sudos
1 parent f1394ef commit 1442642

6 files changed

Lines changed: 464 additions & 58 deletions

File tree

_data/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
- title: Advanced Tutorials with Zephyr
7070
docs:
7171
- tutorials/advanced/zephyr/zephyr_getting_started
72+
- tutorials/advanced/zephyr/zephyr_emulator
7273

7374

7475
- title: Advanced Tutorials with Linux

_docs/concepts/rtos/comparison/index.md

Lines changed: 53 additions & 53 deletions
Large diffs are not rendered by default.

_docs/tutorials/advanced/freertos/freertos_getting_started/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ micro-ROS apps for Olimex + FreeRTOS are located at `firmware/freertos_apps/apps
6868

6969
```bash
7070
# Creating a new app
71-
cd firmware/freertos_apps/apps
71+
pushd firmware/freertos_apps/apps
7272
mkdir my_brand_new_app
7373
cd my_brand_new_app
7474
touch app.c app-colcon.meta
75+
popd
7576
```
7677

7778
For this example we are going to create a ping pong app where a node sends a ping package with a unique identifier using a publisher and the same package is received by a pong subscriber. The node will also answer to:
@@ -153,8 +154,9 @@ void appMain(void *argument)
153154
rcl_publisher_t pong_publisher = rcl_get_zero_initialized_publisher();
154155
rcl_publisher_init(&pong_publisher, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Header), "/microROS/pong", &pong_publisher_ops);
155156

156-
// Create a reliable pong subscriber
157+
// Create a best effort pong subscriber
157158
rcl_subscription_options_t pong_subscription_ops = rcl_subscription_get_default_options();
159+
pong_subscription_ops.qos.reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT;
158160
rcl_subscription_t pong_subscription = rcl_get_zero_initialized_subscription();
159161
rcl_subscription_init(&pong_subscription, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Header), "/microROS/pong", &pong_subscription_ops);
160162

@@ -296,7 +298,8 @@ First of all, create and build a micro-ROS agent:
296298
ros2 run micro_ros_setup create_agent_ws.sh
297299

298300
# Build micro-ROS-Agent packages, this may take a while.
299-
colcon build
301+
colcon build --metas src
302+
source install/local_setup.bash
300303
```
301304

302305
Then connect the Olimex development board to the computer using the usb to serial cable:
75.3 KB
Loading

0 commit comments

Comments
 (0)