Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CF publisher app #52

Merged
merged 1 commit into from
Jan 28, 2021
Merged
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
9 changes: 7 additions & 2 deletions apps/crazyflie_position_publisher/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <geometry_msgs/msg/point32.h>

#include <rcutils/allocator.h>

#include <rmw_uros/options.h>

#include "config.h"
#include "log.h"
Expand Down Expand Up @@ -61,8 +61,13 @@ void appMain(){
rcl_allocator_t allocator = rcl_get_default_allocator();
rclc_support_t support;

rcl_init_options_t init_options = rcl_get_zero_initialized_init_options();
RCCHECK(rcl_init_options_init(&init_options, allocator));
rmw_init_options_t* rmw_options = rcl_init_options_get_rmw_init_options(&init_options);
rmw_uros_options_set_serial_device("65", rmw_options);

// create init_options
RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));
RCCHECK(rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator));

// create node
rcl_node_t node;
Expand Down