I have a question how to compile ros-i2cpwmboard on ros melodic

asked 2019-06-29 14:32:46 -0500

Dan1 gravatar image

Hi , I'm getting error when compiling (catkin_make) ros-i2cpwmboard on ros melodic.

Package link : https://gitlab.com/bradanlane/ros-i2c...

Error msg:

(env) d@d-desktop:~/catkin_ws$ catkin_make Base path: /home/d/catkin_ws Source space: /home/d/catkin_ws/src Build space: /home/d/catkin_ws/build Devel space: /home/d/catkin_ws/devel Install space: /home/d/catkin_ws/install

Running command: "make cmake_check_build_system" in "/home/d/catkin_ws/build" Running command: "make -j4 -l4" in "/home/d/catkin_ws/build" [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target i2cpwmboard_generate_messages_check_deps_Position [ 0%] Built target i2cpwmboard_generate_messages_check_deps_StopServos [ 0%] Built target i2cpwmboard_generate_messages_check_deps_ServosConfig [ 0%] Built target i2cpwmboard_generate_messages_check_deps_DriveMode [ 0%] Built target i2cpwmboard_generate_messages_check_deps_Servo [ 0%] Built target i2cpwmboard_generate_messages_check_deps_ServoConfigArray [ 0%] Built target i2cpwmboard_generate_messages_check_deps_ServoConfig [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target i2cpwmboard_generate_messages_check_deps_PositionArray [ 0%] Built target i2cpwmboard_generate_messages_check_deps_IntValue [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target i2cpwmboard_generate_messages_check_deps_ServoArray [ 0%] Built target std_msgs_generate_messages_eus [ 21%] Built target i2cpwm_board_generate_messages_py [ 40%] Built target i2cpwm_board_generate_messages_cpp [ 58%] Built target i2cpwm_board_generate_messages_lisp [ 76%] Built target i2cpwm_board_generate_messages_nodejs [ 96%] Built target i2cpwm_board_generate_messages_eus [ 98%] Building CXX object ros-i2cpwmboard/CMakeFiles/i2cpwm_board.dir/src/i2cpwm_controller.cpp.o [ 98%] Built target i2cpwm_board_generate_messages /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp: In function ‘void setpwm_frequency(int)’: /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:422:15: error: ‘i2c_smbus_read_byte_data’ was not declared in this scope oldmode = i2c_smbus_read_byte_data (controllerio_handle, __MODE1); ^~~~~~~~~~~~~~~~~~~~~~~~ /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:422:15: note: suggested alternative: ‘i2c_smbus_ioctl_data’ oldmode = i2c_smbus_read_byte_data (controllerio_handle, __MODE1); ^~~~~~~~~~~~~~~~~~~~~~~~ i2c_smbus_ioctl_data /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:425:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope if (0 > i2c_smbus_write_byte_data (controllerio_handle, __MODE1, newmode)) // go to sleep ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:425:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’ if (0 > i2c_smbus_write_byte_data (controllerio_handle, __MODE1, newmode)) // go to sleep ^~~~~~~~~~~~~~~~~~~~~~~~~ i2c_smbus_ioctl_data /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:428:14: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope if (0 > i2c_smbus_write_byte_data(controllerio_handle, __PRESCALE, (int)(floor(prescale)))) ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:428:14: note: suggested alternative: ‘i2c_smbus_ioctl_data’ if (0 > i2c_smbus_write_byte_data(controllerio_handle, __PRESCALE, (int)(floor(prescale)))) ^~~~~~~~~~~~~~~~~~~~~~~~~ i2c_smbus_ioctl_data /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:431:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope if (0 > i2c_smbus_write_byte_data(controllerio_handle, __MODE1, oldmode)) ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:431:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’ if (0 > i2c_smbus_write_byte_data(controllerio_handle, __MODE1, oldmode)) ^~~~~~~~~~~~~~~~~~~~~~~~~ i2c_smbus_ioctl_data /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:436:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope if (0 > i2c_smbus_write_byte_data(controllerio_handle, __MODE1, oldmode | 0x80)) ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:436:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’ if (0 > i2c_smbus_write_byte_data(controllerio_handle, __MODE1, oldmode | 0x80)) ^~~~~~~~~~~~~~~~~~~~~~~~~ i2c_smbus_ioctl_data /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp: In function ‘void setpwm_interval_all(int, int)’: /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:459:13: error: ‘i2c_smbus_write_byte_data’ was not declared in this scope if (0 > i2c_smbus_write_byte_data (controllerio_handle, _ALLCHANNELS_ON_L, start & 0xFF)) ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:459:13: note: suggested alternative: ‘i2c_smbus_ioctl_data’ if (0 > i2c_smbus_write_byte_data (controllerio_handle, _ALLCHANNELS_ON_L, start & 0xFF)) ^~~~~~~~~~~~~~~~~~~~~~~~~ i2c_smbus_ioctl_data /home/d/catkin_ws/src/ros-i2cpwmboard/src/i2cpwm_controller.cpp:461:14: error ... (more)

edit retag flag offensive close merge delete