Closed liwenz closed 3 years ago
wget from url = https://gitlab.com/bradanlane/ros-i2cpwmboard.git then : leon@ubuntu:~/catkin_ws/src$ unzip -l r*.zip Archive: ros-i2cpwmboard-master.zip 9d5b00da8dbdbc542343b65f87f505b0ddb33f8f
leon@ubuntu:~/catkin_ws/src/ros-i2cpwmboard-master$ ls CMakeLists.txt doc launch msg package.xml README.md src srv
but: leon@ubuntu:~/catkin_ws$ catkin_make --only-pkg-with-deps ros-i2cpwmboard-master Base path: /home/leon/catkin_ws Source space: /home/leon/catkin_ws/src Build space: /home/leon/catkin_ws/build Devel space: /home/leon/catkin_ws/devel Install space: /home/leon/catkin_ws/install Packages "ros-i2cpwmboard-master" not found in the workspace
I make a new dog_ws workspace. cp ros-i2cpwmboard-master => ros-i2cpwmboard
then i2c is ok but -- Could not find the required component 'joy'.
sudo apt-get install ros-kinetic-joy sudo apt-get install ros-kinetic-rplidar-ros sudo apt-get install ros-kinetic-hector-slam
then joy is ok but
-- +++ processing catkin package: 'spot_micro_joy' -- ==> add_subdirectory(spot_micro_joy) -- +++ processing catkin package: 'spot_micro_motion_cmd' -- ==> add_subdirectory(spot_micro_motion_cmd) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Error at spot_micro_motion_cmd/CMakeLists.txt:20 (add_subdirectory): The source directory
/home/leon/dog_ws/src/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp
does not contain a CMakeLists.txt file.
the line 20 is: add_subdirectory(libs/spot_micro_kinematics_cpp)
git submodule command should be in src folder: At first, it said some is not free. I mv it,then it's ok as follow:
leon@ubuntu:~/dog_ws/src$ git submodule update --init --recursive Cloning into 'ros-i2cpwmboard'... remote: Enumerating objects: 10, done. remote: Counting objects: 100% (10/10), done. remote: Compressing objects: 100% (9/9), done. remote: Total 258 (delta 2), reused 0 (delta 0), pack-reused 248 Receiving objects: 100% (258/258), 261.32 KiB | 0 bytes/s, done. Resolving deltas: 100% (126/126), done. Checking connectivity... done. Submodule path 'ros-i2cpwmboard': checked out 'c73f89a8687e2a9c7698522d6015e06f1228050e' Cloning into 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp'... remote: Enumerating objects: 207, done. remote: Counting objects: 100% (207/207), done. remote: Compressing objects: 100% (126/126), done. remote: Total 207 (delta 91), reused 162 (delta 51), pack-reused 0 Receiving objects: 100% (207/207), 40.61 KiB | 0 bytes/s, done. Resolving deltas: 100% (91/91), done. Checking connectivity... done. Submodule path 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp': checked out 'ef154d7c05eba241800319cbdf58d0d437dbb072' Cloning into 'spot_micro_plot/scripts/spot_micro_kinematics_python'... remote: Enumerating objects: 104, done. remote: Counting objects: 100% (104/104), done. remote: Compressing objects: 100% (54/54), done. remote: Total 104 (delta 55), reused 90 (delta 47), pack-reused 0 Receiving objects: 100% (104/104), 694.39 KiB | 0 bytes/s, done. Resolving deltas: 100% (55/55), done. Checking connectivity... done. Submodule path 'spot_micro_plot/scripts/spot_micro_kinematics_python': checked out '29efae700b73c3d970d1ada4a81d0f93d53ff680' leon@ubuntu:~/dog_ws/src$ cd ..
then catkin_make is ok:
leon@ubuntu:~/dog_ws$ catkin_make Base path: /home/leon/dog_ws Source space: /home/leon/dog_ws/src Build space: /home/leon/dog_ws/build Devel space: /home/leon/dog_ws/devel Install space: /home/leon/dog_ws/install
-- Using CATKIN_DEVEL_PREFIX: /home/leon/dog_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/leon/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/leon/catkin_ws/devel;/opt/ros/kinetic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/leon/dog_ws/build/test_results
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.12")
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~
-- ~~ traversing 9 packages in topological order:
-- ~~ - i2cpwm_board
-- ~~ - lcd_monitor
-- ~~ - servo_move_keyboard
-- ~~ - spot_micro_keyboard_command
-- ~~ - spot_micro_plot
-- ~~ - spot_micro_rviz
-- ~~ - spot_micro_joy
-- ~~ - spot_micro_motion_cmd
-- ~~ - spot_micro_launch
-- ~~~~~~~~~~~~~
-- +++ processing catkin package: 'i2cpwm_board'
-- ==> add_subdirectory(ros-i2cpwmboard)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- i2cpwm_board: 6 messages, 4 services
-- +++ processing catkin package: 'lcd_monitor'
-- ==> add_subdirectory(lcd_monitor)
-- +++ processing catkin package: 'servo_move_keyboard'
-- ==> add_subdirectory(servo_move_keyboard)
-- +++ processing catkin package: 'spot_micro_keyboard_command'
-- ==> add_subdirectory(spot_micro_keyboard_command)
-- +++ processing catkin package: 'spot_micro_plot'
-- ==> add_subdirectory(spot_micro_plot)
-- +++ processing catkin package: 'spot_micro_rviz'
-- ==> add_subdirectory(spot_micro_rviz)
-- +++ processing catkin package: 'spot_micro_joy'
-- ==> add_subdirectory(spot_micro_joy)
-- +++ processing catkin package: 'spot_micro_motion_cmd'
-- ==> add_subdirectory(spot_micro_motion_cmd)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'spot_micro_launch'
-- ==> add_subdirectory(spot_micro_launch)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/leon/dog_ws/build
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_StopServos [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServoConfig [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_Servo [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_Position [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServoConfigArray [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_DriveMode [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_IntValue [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServosConfig [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServoArray [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target _i2cpwm_board_generate_messages_check_deps_PositionArray [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_eus Scanning dependencies of target spot_micro_kinematics Scanning dependencies of target gtest [ 1%] Building CXX object spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/spot_micro_kinematics.dir/src/spot_micro_kinematics.cpp.o [ 2%] Building CXX object gtest/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o [ 3%] Building CXX object spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/spot_micro_kinematics.dir/src/utils.cpp.o [ 5%] Linking CXX shared library libgtest.so [ 5%] Built target gtest [ 6%] Generating C++ code from i2cpwm_board/Position.msg [ 7%] Generating C++ code from i2cpwm_board/ServoConfig.msg [ 8%] Generating C++ code from i2cpwm_board/ServoConfigArray.msg [ 10%] Generating C++ code from i2cpwm_board/ServoArray.msg [ 11%] Generating C++ code from i2cpwm_board/PositionArray.msg [ 12%] Generating C++ code from i2cpwm_board/Servo.msg [ 13%] Generating C++ code from i2cpwm_board/IntValue.srv [ 15%] Generating C++ code from i2cpwm_board/DriveMode.srv [ 16%] Generating C++ code from i2cpwm_board/StopServos.srv [ 17%] Generating C++ code from i2cpwm_board/ServosConfig.srv [ 18%] Building CXX object spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/spot_micro_kinematics.dir/src/spot_micro_leg.cpp.o [ 18%] Built target i2cpwm_board_generate_messages_cpp [ 20%] Generating Python from MSG i2cpwm_board/Position [ 21%] Generating Python from MSG i2cpwm_board/ServoConfig [ 22%] Generating Python from MSG i2cpwm_board/ServoConfigArray [ 23%] Generating Python from MSG i2cpwm_board/ServoArray [ 25%] Generating Python from MSG i2cpwm_board/PositionArray [ 26%] Generating Python from MSG i2cpwm_board/Servo [ 27%] Generating Python code from SRV i2cpwm_board/IntValue [ 28%] Generating Python code from SRV i2cpwm_board/DriveMode [ 30%] Generating Python code from SRV i2cpwm_board/StopServos [ 31%] Generating Python code from SRV i2cpwm_board/ServosConfig [ 32%] Generating Python msg init.py for i2cpwm_board [ 33%] Linking CXX shared library /home/leon/dog_ws/devel/lib/libspot_micro_kinematics.so [ 35%] Generating Python srv init.py for i2cpwm_board [ 35%] Built target spot_micro_kinematics [ 36%] Generating Javascript code from i2cpwm_board/Position.msg [ 36%] Built target i2cpwm_board_generate_messages_py [ 37%] Generating Lisp code from i2cpwm_board/Position.msg [ 38%] Generating Javascript code from i2cpwm_board/ServoConfig.msg [ 40%] Generating Lisp code from i2cpwm_board/ServoConfig.msg [ 41%] Generating Javascript code from i2cpwm_board/ServoConfigArray.msg [ 42%] Generating Lisp code from i2cpwm_board/ServoConfigArray.msg [ 43%] Generating Javascript code from i2cpwm_board/ServoArray.msg [ 45%] Generating Lisp code from i2cpwm_board/ServoArray.msg [ 46%] Generating Javascript code from i2cpwm_board/PositionArray.msg [ 47%] Generating Lisp code from i2cpwm_board/PositionArray.msg [ 48%] Generating Javascript code from i2cpwm_board/Servo.msg [ 50%] Generating Lisp code from i2cpwm_board/Servo.msg [ 51%] Generating Javascript code from i2cpwm_board/IntValue.srv [ 52%] Generating Lisp code from i2cpwm_board/IntValue.srv [ 53%] Generating Javascript code from i2cpwm_board/DriveMode.srv [ 55%] Generating Lisp code from i2cpwm_board/DriveMode.srv [ 56%] Generating Javascript code from i2cpwm_board/StopServos.srv [ 57%] Generating Lisp code from i2cpwm_board/StopServos.srv [ 58%] Generating Javascript code from i2cpwm_board/ServosConfig.srv [ 60%] Generating Lisp code from i2cpwm_board/ServosConfig.srv [ 60%] Built target i2cpwm_board_generate_messages_nodejs [ 61%] Generating EusLisp code from i2cpwm_board/Position.msg [ 61%] Built target i2cpwm_board_generate_messages_lisp Scanning dependencies of target smfsm [ 62%] Generating EusLisp code from i2cpwm_board/ServoConfig.msg [ 63%] Building CXX object spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_state.cpp.o [ 65%] Generating EusLisp code from i2cpwm_board/ServoConfigArray.msg [ 66%] Generating EusLisp code from i2cpwm_board/ServoArray.msg [ 67%] Generating EusLisp code from i2cpwm_board/PositionArray.msg [ 68%] Generating EusLisp code from i2cpwm_board/Servo.msg [ 70%] Generating EusLisp code from i2cpwm_board/IntValue.srv [ 71%] Generating EusLisp code from i2cpwm_board/DriveMode.srv [ 72%] Generating EusLisp code from i2cpwm_board/StopServos.srv [ 73%] Generating EusLisp code from i2cpwm_board/ServosConfig.srv [ 75%] Built target i2cpwm_board_generate_messages_eus Scanning dependencies of target gtest_main [ 76%] Building CXX object gtest/gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o [ 77%] Linking CXX shared library libgtest_main.so [ 77%] Built target gtest_main Scanning dependencies of target i2cpwm_board [ 78%] Building CXX object ros-i2cpwmboard/CMakeFiles/i2cpwm_board.dir/src/i2cpwm_controller.cpp.o [ 80%] Building CXX object spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_idle.cpp.o [ 81%] Linking CXX executable /home/leon/dog_ws/devel/lib/i2cpwm_board/i2cpwm_board [ 81%] Built target i2cpwm_board [ 81%] Built target i2cpwm_board_generate_messages Scanning dependencies of target test_spot_micro_kinematics [ 82%] Building CXX object spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/test_spot_micro_kinematics.dir/tests/test_spot_micro_kinematics.cpp.o [ 83%] Linking CXX executable test_spot_micro_kinematics [ 85%] Building CXX object spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_stand.cpp.o [ 85%] Built target test_spot_micro_kinematics Scanning dependencies of target test_spot_micro_leg [ 86%] Building CXX object spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o [ 87%] Linking CXX executable test_spot_micro_leg [ 87%] Built target test_spot_micro_leg Scanning dependencies of target test_utils [ 88%] Building CXX object spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/test_utils.dir/tests/test_utils.cpp.o [ 90%] Building CXX object spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_transition_stand.cpp.o [ 91%] Linking CXX executable test_utils [ 91%] Built target test_utils [ 92%] Building CXX object spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_transition_idle.cpp.o [ 93%] Building CXX object spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_walk.cpp.o [ 95%] Linking CXX shared library /home/leon/dog_ws/devel/lib/libsmfsm.so [ 95%] Built target smfsm Scanning dependencies of target spot_micro_motion_cmd_node [ 96%] Building CXX object spot_micro_motion_cmd/CMakeFiles/spot_micro_motion_cmd_node.dir/src/spot_micro_motion_cmd.cpp.o [ 97%] Building CXX object spot_micro_motion_cmd/CMakeFiles/spot_micro_motion_cmd_node.dir/src/spot_micro_motion_cmd_node.cpp.o [ 98%] Building CXX object spot_micro_motion_cmd/CMakeFiles/spot_micro_motion_cmd_node.dir/src/utils.cpp.o [100%] Linking CXX executable /home/leon/dog_ws/devel/lib/spot_micro_motion_cmd/spot_micro_motion_cmd_node [100%] Built target spot_micro_motion_cmd_node
The compile process for step by step At first, you should install ros on ubuntu Then make a workplace as dog:
leon@ubuntu:~$ mkdir -p dog/src leon@ubuntu:~$ cd dog leon@ubuntu:~/dog$ ls src leon@ubuntu:~/dog$ cd src leon@ubuntu:~/dog/src$ git init Initialized empty Git repository in /home/leon/dog/src/.git/ leon@ubuntu:~/dog/src$ git pull https://github.com/mike4192/spotMicro remote: Enumerating objects: 32, done. remote: Counting objects: 100% (32/32), done. remote: Compressing objects: 100% (26/26), done. remote: Total 1152 (delta 11), reused 15 (delta 5), pack-reused 1120 Receiving objects: 100% (1152/1152), 25.59 MiB | 3.45 MiB/s, done. Resolving deltas: 100% (608/608), done. From https://github.com/mike4192/spotMicro branch HEAD -> FETCH_HEAD leon@ubuntu:~/dog/src$ git submodule update --init --recursive Submodule 'ros-i2cpwmboard' (https://gitlab.com/bradanlane/ros-i2cpwmboard.git) registered for path 'ros-i2cpwmboard' Submodule 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp' (https://github.com/mike4192/spot_micro_kinematics_cpp.git) registered for path 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp' Submodule 'spot_micro_plot/scripts/spot_micro_kinematics_python' (https://github.com/mike4192/spot_micro_kinematics_python.git) registered for path 'spot_micro_plot/scripts/spot_micro_kinematics_python' Cloning into 'ros-i2cpwmboard'... remote: Enumerating objects: 10, done. remote: Counting objects: 100% (10/10), done. remote: Compressing objects: 100% (9/9), done. remote: Total 258 (delta 2), reused 0 (delta 0), pack-reused 248 Receiving objects: 100% (258/258), 261.32 KiB | 0 bytes/s, done. Resolving deltas: 100% (126/126), done. Checking connectivity... done. Submodule path 'ros-i2cpwmboard': checked out 'c73f89a8687e2a9c7698522d6015e06f1228050e' Cloning into 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp'... remote: Enumerating objects: 207, done. remote: Counting objects: 100% (207/207), done. remote: Compressing objects: 100% (126/126), done. remote: Total 207 (delta 91), reused 162 (delta 51), pack-reused 0 Receiving objects: 100% (207/207), 40.61 KiB | 0 bytes/s, done. Resolving deltas: 100% (91/91), done. Checking connectivity... done. Submodule path 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp': checked out 'ef154d7c05eba241800319cbdf58d0d437dbb072' Cloning into 'spot_micro_plot/scripts/spot_micro_kinematics_python'... remote: Enumerating objects: 104, done. remote: Counting objects: 100% (104/104), done. remote: Compressing objects: 100% (54/54), done. remote: Total 104 (delta 55), reused 90 (delta 47), pack-reused 0 Receiving objects: 100% (104/104), 694.39 KiB | 0 bytes/s, done. Resolving deltas: 100% (55/55), done. Checking connectivity... done. Submodule path 'spot_micro_plot/scripts/spot_micro_kinematics_python': checked out '29efae700b73c3d970d1ada4a81d0f93d53ff680' leon@ubuntu:~/dog/src$ git submodule update --recursive leon@ubuntu:~/dog/src$ sudo apt-get install ros-kinetic-joy
sudo apt-get install ros-kinetic-rplidar-ros sudo apt-get install ros-kinetic-hector-slam sudo apt-get install libi2c-dev
They should be installed, I have done them before.
leon@ubuntu:~/dog/src$ cd .. leon@ubuntu:~/dog$ catkin_make
Then compile 100% finished.
I tried to compile on raspberry os PI b3,
ros--geometry-msgs needed.
and
sudo apt-get install ros-kinetic-joy
sudo apt-get install ros-kinetic-rplidar-ros
sudo apt-get install ros-kinetic-hector-slam
can't be found
I only compiled the core version ros and no vision.
I wouldn't recommend trying to compile ros from source on raspbian OS, I tried it early on and ran into issues. It also takes very long to compile. I'm impressed you got as far as you did. The issues can be overcome but it will probably be tedious and a long drawn out process. If you wanted to continue this way, you would also need to compile those packages from source as well in your catkin ws src directory (joy, rplidar, hector-slam, etc...). You'd need to download their source from their respective github pages (making sure to download the ros kinetic versions if they have a kinetic specific branch).
Why not just utilize premade ubuntu 16.04 RPi images from ubiquity robotics like I recommend in the documentation? These come preinstalled with ROS kinetic basically all ready to go, and then you can install the required packages via sudo apt-get
no problemo.
You just need to follow the instructions to modify the wifi settings so it will connect to your local wifi network, then you wont have to directly wifi connect to the RPi.
Thanks for your reply. before, I tried ubiquity robotics, sometime it will be dead and I don't like the face. I tried the ubuntu,but only find the 20.04, it could not boot.
As your recommand, today I tried them again.
I tried ubiquity robotics, but sudo apt-get install ros-kinetic-rplidar-ros fail. I tried to catkin_make but some error(need something).
lots of people said 20.04 could not boot, I boot to choose language, but it can't know my keyboard and mouse. Sb said 20.10 could boot, I did . 20.10 could boot,but firefox is too slow. I got ubuntu 18, it work well . I install ros/melodic. That's ok. https://releases.ubuntu-mate.org/archived/18.04/arm64/
I tried to compile as I did in ubuntu16. Everything seem fine, until compile to 78%. dog/src/ros-i2cpwmboard/src/i2cpwm+ccontroller.cpp 5559:13: error /i'i2c_smbus_write_byte_data' was not declared in this scope
lots of such error
I have compiled it 100% on ubuntu18 (download from: https://releases.ubuntu-mate.org/archived/18.04/arm64/) ros/melodic ( I install it as http://wiki.ros.org/melodic/Installation/Ubuntu)
it is almost same as I did last post. except: sudo apt-get install ros-melodic-joy sudo apt-get install ros-melodic-rplidar-ros sudo apt-get install ros-melodic-hector-slam
the i2ccpwm need change as git: https://github.com/EricWiener/ros-i2cpwmboards/commit/9ae9556a043ac2fe75a3251c9b28318b5383e744
Next I need test and let it walk.
I don't know how to test at first.
Yesterday I run follow cmd, and it told me no i2c_pwmboard. Today I installed the i2c_pwmboard ( and no serve connected )and run again:
roslaunch spot_micro_motion_cmd motion_cmd.launch
I got lots of follow error and never stop:
[ERROR] [1617219122.369564558]: Error setting PWM end low byte on servo 10 on board 1 [ERROR] [1617219122.369930598]: Error setting PWM end high byte on servo 10 on board 1 [ERROR] [1617219122.370153982]: Error setting PWM start low byte on servo 11 on board 1 [ERROR] [1617219122.370364294]: Error setting PWM start high byte on servo 11 on board 1 [ERROR] [1617219122.370532209]: Error setting PWM end low byte on servo 11 on board 1 [ERROR] [1617219122.370723198]: Error setting PWM end high byte on servo 11 on board 1 [ERROR] [1617219122.370904395]: Error setting PWM start low byte on servo 12 on board 1 [ERROR] [1617219122.371067780]: Error setting PWM start high byte on servo 12 on board 1 [ERROR] [1617219122.371235018]: Error setting PWM end low byte on servo 12 on board 1 [ERROR] [1617219122.371462778]: Error setting PWM end high byte on servo 12 on board 1 [ERROR] [1617219122.381532884]: Error setting PWM start low byte on servo 1 on board 1 [ERROR] [1617219122.381917049]: Error setting PWM start high byte on servo 1 on board 1 [ERROR] [1617219122.382129183]: Error setting PWM end low byte on servo 1 on board 1 [ERROR] [1617219122.382428713]: Error setting PWM end high byte on servo 1 on board 1
Hmm, I sometimes see this error but to be honest I'm not sure what causes it. I think you may need a servo connected.
Looking into the source for the i2cpwm_board package, it looks like this is an error resulting when the actual i2c writing operation fails. For example, from the source code:
555 if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __CHANNEL_ON_L+4*channel, start & 0xFF))
556 ROS_ERROR ("Error setting PWM start low byte on servo %d on board %d", servo, _active_board);
557 if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __CHANNEL_ON_H+4*channel, start >> 8))
558 ROS_ERROR ("Error setting PWM start high byte on servo %d on board %d", servo, _active_board);
559 if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __CHANNEL_OFF_L+4*channel, end & 0xFF))
560 ROS_ERROR ("Error setting PWM end low byte on servo %d on board %d", servo, _active_board);
561 if (0 > i2c_smbus_write_byte_data (_controller_io_handle, __CHANNEL_OFF_H+4*channel, end >> 8))
562 ROS_ERROR ("Error setting PWM end high byte on servo %d on board %d", servo, _active_board);
Make sure you can see the pwm board on your RPi. See the following page, section "Testing I2C":
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c#testing-i2c-2724591-14
For example, running the command like: sudo i2cdetect -y 1
Also, you are running the i2cpwmboard on the raspberry pi right? And not on your PC?
Usually if I see it I try relaunching, or power cycling everything. I would verify you are powering all the boards with the correct voltages and have a common ground for everything.
You can also try running the python script for moving servos with the i2cpwmboard library.
roslaunch servo_move_keyboard keyboard_move.launch
You can run the code somewhat like a simulation by launching the following:
On either the raspberry pi or a computer:
roslaunch spot_micro_motion_cmd motion_cmd.launch run_standalone:=true
On a computer:
roslaunch spot_micro_keyboard_command keyboard_command.launch run_rviz:=true
You should then be able to control the robot software and see it walk around in the visualization.
Thanks, I'll try tomorrow. I'm in Canada. It's 23:15
I will change this issue as how to start (compile) and open a new issue as how to start (test and run it)
I hope to start the project. I have installed ros kenetic on ubuntu16 in vmware and learned tutorial for ros. I could not find ubuntu 16 for pi 3B and install pi os and compile ros kenetic on it(ok). Now I try to compile on ubuntu 16 at first. in ~/catkin_ws/src
leon@ubuntu:~/catkin_ws/src$ git init Initialized empty Git repository in /home/leon/catkin_ws/src/.git/ leon@ubuntu:~/catkin_ws/src$ git pull https://github.com/mike4192/spotMicro
now the file and directory is as follow: `leon@ubuntu:~/catkin_ws/src$ ls ros-i2c*
leon@ubuntu:~/catkin_ws/src$ ls assets cmake.txt learning_launch learning_topic ros-i2cpwmboard spot_micro_keyboard_command spot_micro_plot CHANGELOG.md docs learning_service LICENSE servo_move_keyboard spot_micro_launch spot_micro_rviz CMakeLists.txt lcd_monitor learning_tf README.md spot_micro_joy spot_micro_motion_cmd leon@ubuntu:~/catkin_ws/src$`
leon@ubuntu:~/catkin_ws$ git submodule update --init --recursive fatal: Not a git repository (or any of the parent directories): .git leon@ubuntu:~/catkin_ws$ sudo apt-get install libi2c-dev [sudo] password for leon: ok
leon@ubuntu:~/catkin_ws$ catkin_make error: -- Could not find the required component 'i2cpwm_board'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
I tried: https://github.com/dheera/ros-pwm-pca9685 sudo apt-get install libi2c-dev done
how to resolve no 'i2cpwm_board'?