Skip to content

TImestamp Capture Position #35

@ceyhunbilir

Description

@ceyhunbilir

Hello,

I wonder why we don't capture the timestamp immediately after setting the GPIO pin to HIGH?

bool to_high = gpio_handler_.set_gpio_pin_state(GPIO_HIGH);
rclcpp::sleep_for(std::chrono::nanoseconds(pulse_width));
rclcpp::Time now = rclcpp::Clock{RCL_SYSTEM_TIME}.now();
int64_t now_sec = now.nanoseconds() / 1e9;
trigger_time_msg.sec = (int32_t)now_sec;
trigger_time_msg.nanosec = (uint32_t)now_nsec;
trigger_time_publisher_->publish(trigger_time_msg);
bool to_low = gpio_handler_.set_gpio_pin_state(GPIO_LOW);

In the current implementation above, we are waiting until the falling edge. Why? Is the camera capturing the frame according to a falling edge?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions