ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cmakelist For Jetson GPIO on ROS melodic [closed]

asked 2021-09-22 14:50:15 -0500

Flash gravatar image

updated 2021-09-22 14:55:05 -0500

Hi, I am trying to use GPIO on Jetson via ROS but seems like my CMakelist is not properly setup due to which I am getting errors as

undefined reference to 'GPIO::setmode(GPIO::NumberingModes)'

Below is my Cmakelist

cmake_minimum_required(VERSION 3.0.2)
project(camera_gpio)

## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)

## Generate added messages and services
generate_messages(DEPENDENCIES std_msgs)

## Declare a catkin package
catkin_package(
  LIBRARIES camera_gpio
  CATKIN_DEPENDS roscpp rospy std_msgs)
# set(GPIO_INCLUDE_DIR ../include )

## Build talker and listener
include_directories(include ${catkin_INCLUDE_DIRS})

add_executable(gpio_control src/camera_gpio_node.cpp)
target_link_libraries(gpio_control ${catkin_LIBRARIES})
add_dependencies(gpio_control ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})

Any help would be appreciated.

Below is my file structure

image description

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Flash
close date 2021-10-07 15:05:10.937149

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-27 09:49:20 -0500

Flash gravatar image

Hi, I had used the Python version for jetsonGPIO communication due to which I didn't have to worry about the CMakelist. Just incase anyone comes across the same issue.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-09-22 14:50:15 -0500

Seen: 163 times

Last updated: Sep 27 '21