ros-i2cpwmboard on Jetson Nano
I'm currently working on my first ROS project. Currently I'm running Melodic on a Jetson Nano with a Donkey Car base which is an Exceed Magnet RC car and a PCA9685 servo driver. I chose this hardware because I already had it. I have RPLidar with SLAM working and a realsense camera working. I still need to study up on a Navigation stack so I can tie everything together.
I'm having issues with with finding a way to control the Donkey Car base.
I found ros-i2cpwmboard however, I can't seem to get the package to compile. Am I on the right track with this package? Is it worth troubleshooting? Or is there a better option I should be looking at?
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp: In function ‘void _set_pwm_frequency(int)’:
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:423:15: error: ‘i2c_smbus_read_byte_data’ was not declared in this scope
oldmode = i2c_smbus_read_byte_data (_controller_io_handle, __MODE1);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:423:15: note: suggested alternative: ‘i2c_smbus_ioctl_data’
oldmode = i2c_smbus_read_byte_data (_controller_io_handle, __MODE1);
^~~~~~~~~~~~~~~~~~~~~~~~
i2c_smbus_ioctl_data
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:426:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope
if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __MODE1, newmode)) // go to sleep
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:426:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’
if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __MODE1, newmode)) // go to sleep
^~~~~~~~~~~~~~~~~~~~~~~~~
i2c_smbus_ioctl_data
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:429:14: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope
if (0 > i2c_smbus_write_byte_data(_controller_io_handle, __PRESCALE, (int)(floor(prescale))))
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:429:14: note: suggested alternative: ‘i2c_smbus_ioctl_data’
if (0 > i2c_smbus_write_byte_data(_controller_io_handle, __PRESCALE, (int)(floor(prescale))))
^~~~~~~~~~~~~~~~~~~~~~~~~
i2c_smbus_ioctl_data
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:432:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope
if (0 > i2c_smbus_write_byte_data(_controller_io_handle, __MODE1, oldmode))
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:432:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’
if (0 > i2c_smbus_write_byte_data(_controller_io_handle, __MODE1, oldmode))
^~~~~~~~~~~~~~~~~~~~~~~~~
i2c_smbus_ioctl_data
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:437:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope
if (0 > i2c_smbus_write_byte_data(_controller_io_handle, __MODE1, oldmode | 0x80))
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:437:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’
if (0 > i2c_smbus_write_byte_data(_controller_io_handle, __MODE1, oldmode | 0x80))
^~~~~~~~~~~~~~~~~~~~~~~~~
i2c_smbus_ioctl_data
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp: In function ‘void _set_pwm_interval_all(int, int)’:
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:460:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope
if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __ALL_CHANNELS_ON_L, start & 0xFF))
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:460:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’
if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __ALL_CHANNELS_ON_L, start & 0xFF))
^~~~~~~~~~~~~~~~~~~~~~~~~
i2c_smbus_ioctl_data
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:462:14: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope
if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __ALL_CHANNELS_ON_H, start >> 8))
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/dave/jetson-car/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:462:14: note: suggested alternative: ‘i2c_smbus_ioctl_data ...
did you find a solution for this problem? I have the same error message and can't fix it since days.
https://gitlab.com/bradanlane/ros-i2c... follow this, solved!