mike4192 / spotmicro Goto Github PK
View Code? Open in Web Editor NEWSpot Micro Quadruped Project
License: MIT License
Spot Micro Quadruped Project
License: MIT License
The ROS navigation stack requires odometry (which seems a little strange to me IMO because of how good lidar localization can be).
This robot platform does not provide accurate odometry, but some fake and hopefully reasonably accurate odometry can be generated via the lidar.
Reprocess a recorded data log to evaluate packages that could provide odometry. Using the hector slam ground track as the baseline truth, analyze which odometry estimate is the most accurate result.
Potential packages to try/investigate:
Even after installing all the subfolders of the repo whenever I run the node rosrun spot_micro_plot spotMicroPlot.py I am getting this error
_ubuntu@niranjan:~$ rosrun spot_micro_plot spotMicroPlot.py Traceback (most recent call last): File "/home/ubuntu/catkin_ws/src/spotMicro/spot_micro_plot/scripts/spotMicroPlot.py", line 29, in <module> ax.set_proj_type('ortho') AttributeError: 'Axes3D' object has no attribute 'set_proj_type' ubuntu@niranjan:~_
please help me fix this error.
thank you.
I ran through the calibration routine using the spreadsheet and entered the calculated values into the yaml file.
When I command the servo into the center position it looks great, like the picture in the neutral state.
But when I run the "rosrun spot_micro_keyboard_command spotMicroKeyboardMove.py" and issue a stand command the front leg immediately goes to a backward 45 angle
https://imgur.com/a/cApK967
I also get this error in the terminal
[ WARN] [1596336583.533563203]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.533835589]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.553476302]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.553757596]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.573577177]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.573853378]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.593459128]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.593915327]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.613521374]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.613794593]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.633489028]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.633760377]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.653448108]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.653721124]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.673585408]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.673774240]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.693472396]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.693737227]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.713493661]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.713679270]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.733790867]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.733975291]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.753532801]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.753724707]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.774142189]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.774325595]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.793581941]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.793861235]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.813496429]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.813672335]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.833531693]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.833710951]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.853449181]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.853721808]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.873620518]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.873901886]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.893545302]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.893816966]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.913516716]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.913795417]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.933498221]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.933762756]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.953468060]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.953746243]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.973585231]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.973868488]: Joint LF_3, Angle: -98.66
[ WARN] [1596336583.993482553]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336583.994062677]: Joint LF_3, Angle: -98.66
[ WARN] [1596336584.013564632]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1596336584.013845518]: Joint LF_3, Angle: -98.66
First words: i'm unsure i this is an error in that ods or my failure. After all, my spotmicro is walking okay, first try.
But, that ods to calculate the servo calibration values was a bit irritating for 2 lines - which looks a bit like they where swapped.
If i compare the values of hip-servos 3 and 12 this the values from this documentation, they are way of. In fact even the direction is the opposite. The other offsets are in a reasonable range. I've attached a screenshot of my values.
After rechecking that multiple times i gave it a go and started everything. micro is walking quite good with this values.
ubuntu@ubiquityrobot:~/catkin_ws/spotMicro/spot_micro_motion_cmd/launch$ roslaunch motion_cmd.launch
... logging to /home/ubuntu/.ros/log/757ba30e-d0dc-11e5-a5a1-0d85260fab15/roslaunch-ubiquityrobot-8408.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 306, in main
p.start()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
self._start_infrastructure()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
self._load_config()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
loader.load(f, config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 749, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 721, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 657, in _recurse_load
n = self._node_tag(tag, context, ros_config, default_machine, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 410, in _node_tag
self._rosparam_tag(t, param_ns, ros_config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 228, in _rosparam_tag
cmd, ns, file, param, subst_value = self.opt_attrs(tag, context, (XmlLoader.ROSPARAM_OPT_ATTRS))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 202, in opt_attrs
return [self.resolve_args(tag_value(tag,a), context) for a in attrs]
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 370, in resolve_args
resolved = _resolve_args(resolved, context, resolve_anon, commands)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 383, in _resolve_args
resolved = commands[command](resolved, a, args, context)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 151, in _find
source_path_to_packages=source_path_to_packages)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 197, in _find_executable
full_path = _get_executable_path(rp.get_path(args[0]), path)
File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 203, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: spot_micro_motion_cmd
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/ubuntu/catkin_ws/src/demos/dnn_rotate
ROS path [2]=/home/ubuntu/catkin_ws/src/demos/docking
ROS path [3]=/home/ubuntu/catkin_ws/src/demos/fiducial_follow
ROS path [4]=/home/ubuntu/catkin_ws/src/demos/move_demo
ROS path [5]=/opt/ros/kinetic/share
Setup the costmap for autonomous nav. See: http://wiki.ros.org/navigation/Tutorials/RobotSetup
Calculate robot odometery by integrating velocity/rate commands over time. Although the robot doesn't have true sensed odometry, outputting a calculated value will still be useful.
Hello @mike4192,
A really big thank you for sharing this amazing project. I decided to implement it on a RPI4 running Ubuntu 20.04 and ROS Noetic. I used the MG996R servos, your exact same LCD, same 3D printed parts and a switching power supply (5.5 V, 8A) connected to the line. I got it assembled without any major complication. On the software part, I was able to compile the catkin_ws using catkin_tools but I had to make some minor changes:
extern "C"{#include i2c/smbus.h}
to i2cpwm_controller.cpp
CMakeLists.txt
from i2cpwm_board
package -> from target_link_libraries(i2cpwm_board ${catkin_LIBRARIES})
to target_link_libraries(i2cpwm_board ${catkin_LIBRARIES} i2c)
spotMicroKeyboardMove.py
changing the first line from #!/usr/bin/python
to #!/usr/bin/python3
. You have also to change the function rawInput
to input
(Pyhton 3 version of raw input) and another thing that I can't remember now.After those changes the catkin_ws is compiled by doing catkin build
. I've then changed the ROS_MASTER_URI
variable to the ip address of the RPI4, port 11311. After this I was able to start the roscore on the Raspberry and list all the topic from the PC.
Following your instructions I've launched spot_micro_motion_cmd motion_cmd.launch
on the RPI and everything seems OK from logs (frequency is set to 50 HZ after bus opened on the right port and servo config is loaded) and the LCD shows "State: Idle". On the PC side I start the spot_micro_keyboard_command keyboard_command.launch
but when I issue the stand command nothing happens not even the LCD changes state. Nothing happens even with walk
or idle
command.
Echoing some topics and searching through rosnodes infos everything seems working as it meant to be.
I can tell you thath the i2cpwm_board
is working because I completed the entire calibration process following your instructions (and yes, the motors move).
I cannot find the real core of conversion from calculated angles to /servos_proportional publishing
.
If you are interested, we can set up a call or something to scope why and where the communication fails. This way we can have your SW implemented in ROS Noetic and Ubuntu 20.04 (a long term support, so, it's convenient i think).
Hi, I have added some extra sensors to my spot mini and I'd like to know how to add them to the model so it han handle and be trained with those.
Thanks
sudo apt-get install ros-kinetic-rplidar-ros
sudo apt-get install ros-kinetic-hector-slam
Add ROS style API documentation to the nodes in this project. Define the messages that are published and subscribed to in each node, as well as parameters. See ROS robot state publisher API as an example.
Probably best to document API in another doc for all nodes. Edit the README to link this doc, and add a API section to the table of contents.
I have successfully built this amazing robot, even the extended shoulder supports!
Raspberry Pi and ROS are all working fine... I went through the calibration and while it drifts around a bit, that seems to work ok.
I am using the recommended PDI-HV5523MG servos with a 7.4V LiPo RC battery.
The problem is that the robot seems to be too heavy for the servos to lift when I issue the "stand" command. It sort of struggles a bit to get 3 legs up, but the 4th leg (RB3) never fully extends unless I put the robot on a stand without adding any weight. On the stand, the legs seem to extend to the proper position.
Is this a design or hardware issue? Or is there a better servo/power combination that I should be using? Any advice is much appreciated! And I really enjoy this project!
Create a high level launch file (or files), for launching robot software for autonomous navigation. This should include an RVIZ configuration that will allow sending graphical navigation commands to the robot.
Add documentation to readme as needed.
Firstly, I got then same trouble as #11 .
After run command python -m pip install matplotlib --upgrade , still got error about numpy.
Then I upgrade numpy to 1.16.4, error was gone.
But when I started RPI nodes, then run spotMicroPlot.py on pc(virtualbox 6.1 ubuntu 16.04.7)
it looks like the next pic:
strange thing is the when I use Ctrl+C to end the program, matplotlib shows the dog status picture
I'm not familiar with matplotlib, please give some help, thx
info maybe useful:
matplotlib version 2.2.5
numpy version 1.16.4
matplotlib backend: TkAgg
Hey Mike,
Thanks for the amazing software suite you've put together! It's incredible to be able to so quickly go from hardware to coordinated movements using it.
I'm having an issue where my spot when I ask it to stand is crooked and it looks like the servos are not configured correctly, though I did try to take care in measuring when doing the config. I was hoping to ask you for your thoughts! I'm using mostly the same hardware as you in terms of HV5523MG servos and a similiar servo board, but I do have an RPI4.
After I configure my servos by updating the .yaml file and run the below nodes,
rosrun i2cpwm_board i2cpwm_board
roslaunch spot_micro_motion_cmd spot_micro_motion_cmd.launch
rosrun spot_micro_keyboard_command spotMicroKeyboardMove.py
I then issue a stand command, my robot is tilted to the side and it looks like the upper servos in the "shoulders" are not going to the right position. Does this look like I've mis-calibrated the servos? I think not all the shoulder joints are in the center with equal movement to each side, but i kind of expected the software to compensate for that given it knows the center angle of each servo. Is that misguided?
I also see output from the i2cpwm_board node that indicates its calculating an angle outside of the movement range of the servo and clipping it, which would seem to indicate something about my servo config is suspect. The below is a sample:
[ WARN] [1455213262.147691540]: Joint LB_2, Angle: 40.64
[ WARN] [1455213262.148428929]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1455213262.148982948]: Joint LB_3, Angle: -126.58
[ WARN] [1455213262.149471059]: Proportional Command below -1.0 was computed, clipped to -1.0
[ WARN] [1455213262.150248114]: Joint LF_3, Angle: -125.66
[ WARN] [1455213262.150982892]: Proportional Command above +1.0 was computed, clipped to 1.0
[ WARN] [1455213262.151215244]: Joint RB_3, Angle: 126.58
[ WARN] [1455213262.151978096]: Proportional Command above +1.0 was computed, clipped to 1.0
[ WARN] [1455213262.152449337]: Joint RF_3, Angle: 125.66
[ WARN] [1455213262.167402744]: Proportional Command above +1.0 was computed, clipped to 1.0
This is what the spreadsheet to calculate config values looks like, and the same values are input into the .yaml config file. Some of the values look a tad odd, and different from the values in your spreadsheet in the repo, in particular the configuration for the upper shoulders where i configured to -45 and the repo spreadsheet configures to -90 as angle 2, for example looking at Servo 2.
I can try taking it apart and re-centering servos, but I also wanted to ask if you had any ideas for me to take a first look at. I appreciate your thoughts!
As a /cmd_vel Twist message is commonly used in ROS, this would make spotMicro's development easier.
Hi,
I've cloned the project int my catkin_ws. I'm running Ubuntu 20.04 and ROS noetic. I've also downloaded the libi2c-dev_3.1.1-1.deb package and installed it. When I try compiling my catkin_ws I get a set of errors due to undefined references. Here's my log:
`giovanni@Giovanni-HP:~/catkin_ws$ catkin_make -DCMAKE_BUILD_TYPE=Release
Base path: /home/giovanni/catkin_ws
Source space: /home/giovanni/catkin_ws/src
Build space: /home/giovanni/catkin_ws/build
Devel space: /home/giovanni/catkin_ws/devel
Install space: /home/giovanni/catkin_ws/install
-- Using CATKIN_DEVEL_PREFIX: /home/giovanni/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/giovanni/catkin_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/giovanni/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/giovanni/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 11 packages in topological order:
-- ~~ - manipulator_moveit_config
-- ~~ - i2cpwm_board
-- ~~ - lcd_monitor
-- ~~ - servo_move_keyboard
-- ~~ - spot_micro_keyboard_command
-- ~~ - spot_micro_motion_cmd
-- ~~ - spot_micro_plot
-- ~~ - spot_micro_simple_command
-- ~~ - spot_micro_walk
-- ~~ - manipulator_description
-- ~~ - moveit_converter
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'manipulator_moveit_config'
-- ==> add_subdirectory(manipulator_moveit_config)
-- +++ processing catkin package: 'i2cpwm_board'
-- ==> add_subdirectory(spotMicro/ros-i2cpwmboard)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- i2cpwm_board: 6 messages, 4 services
-- +++ processing catkin package: 'lcd_monitor'
-- ==> add_subdirectory(spotMicro/lcd_monitor)
-- +++ processing catkin package: 'servo_move_keyboard'
-- ==> add_subdirectory(spotMicro/servo_move_keyboard)
-- +++ processing catkin package: 'spot_micro_keyboard_command'
-- ==> add_subdirectory(spotMicro/spot_micro_keyboard_command)
-- +++ processing catkin package: 'spot_micro_motion_cmd'
-- ==> add_subdirectory(spotMicro/spot_micro_motion_cmd)
-- +++ processing catkin package: 'spot_micro_plot'
-- ==> add_subdirectory(spotMicro/spot_micro_plot)
-- +++ processing catkin package: 'spot_micro_simple_command'
-- ==> add_subdirectory(spotMicro/spot_micro_simple_command)
-- +++ processing catkin package: 'spot_micro_walk'
-- ==> add_subdirectory(spotMicro/spot_micro_walk)
-- +++ processing catkin package: 'manipulator_description'
-- ==> add_subdirectory(manipulator_description)
-- +++ processing catkin package: 'moveit_converter'
-- ==> add_subdirectory(moveit_converter)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- moveit_converter: 1 messages, 0 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/giovanni/catkin_ws/build
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_PositionArray
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_DriveMode
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_StopServos
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServoConfigArray
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServosConfig
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_Servo
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_Position
[ 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 std_msgs_generate_messages_eus
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_ServoConfig
Scanning dependencies of target spot_micro_kinematics
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target _i2cpwm_board_generate_messages_check_deps_IntValue
[ 2%] Built target gtest
[ 2%] Built target sensor_msgs_generate_messages_cpp
[ 3%] Building CXX object spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/spot_micro_kinematics.dir/src/spot_micro_kinematics.cpp.o
[ 5%] Built target move_group_1
[ 5%] Built target sensor_msgs_generate_messages_nodejs
[ 6%] Building CXX object spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/spot_micro_kinematics.dir/src/utils.cpp.o
[ 6%] Built target sensor_msgs_generate_messages_py
[ 6%] Built target sensor_msgs_generate_messages_lisp
[ 6%] Built target _moveit_converter_generate_messages_check_deps_ArmJointState
[ 6%] Built target sensor_msgs_generate_messages_eus
[ 7%] Generating C++ code from i2cpwm_board/Servo.msg
[ 8%] Building CXX object spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/spot_micro_kinematics.dir/src/spot_micro_leg.cpp.o
[ 10%] Generating C++ code from i2cpwm_board/ServoArray.msg
[ 11%] Generating C++ code from i2cpwm_board/ServoConfig.msg
[ 12%] Generating C++ code from i2cpwm_board/ServoConfigArray.msg
[ 13%] Generating C++ code from i2cpwm_board/Position.msg
[ 14%] Generating C++ code from i2cpwm_board/PositionArray.msg
[ 15%] Generating C++ code from i2cpwm_board/IntValue.srv
[ 16%] Generating C++ code from i2cpwm_board/ServosConfig.srv
[ 17%] Generating C++ code from i2cpwm_board/DriveMode.srv
[ 18%] Generating C++ code from i2cpwm_board/StopServos.srv
[ 20%] Generating Python from MSG i2cpwm_board/Servo
[ 21%] Generating Javascript code from i2cpwm_board/Servo.msg
[ 22%] Generating Python from MSG i2cpwm_board/ServoArray
[ 23%] Generating Javascript code from i2cpwm_board/ServoArray.msg
[ 23%] Built target i2cpwm_board_generate_messages_cpp
[ 24%] Generating EusLisp code from i2cpwm_board/Servo.msg
[ 25%] Generating Javascript code from i2cpwm_board/ServoConfig.msg
[ 26%] Generating Python from MSG i2cpwm_board/ServoConfig
[ 27%] Generating Javascript code from i2cpwm_board/ServoConfigArray.msg
[ 28%] Generating EusLisp code from i2cpwm_board/ServoArray.msg
[ 30%] Generating Python from MSG i2cpwm_board/ServoConfigArray
[ 31%] Generating Javascript code from i2cpwm_board/Position.msg
[ 32%] Generating EusLisp code from i2cpwm_board/ServoConfig.msg
[ 33%] Generating Python from MSG i2cpwm_board/Position
[ 34%] Generating Javascript code from i2cpwm_board/PositionArray.msg
[ 35%] Generating Javascript code from i2cpwm_board/IntValue.srv
[ 36%] Generating EusLisp code from i2cpwm_board/ServoConfigArray.msg
[ 37%] Generating Python from MSG i2cpwm_board/PositionArray
[ 38%] Generating Javascript code from i2cpwm_board/ServosConfig.srv
[ 41%] Generating Javascript code from i2cpwm_board/DriveMode.srv
[ 41%] Generating Python code from SRV i2cpwm_board/IntValue
[ 42%] Generating EusLisp code from i2cpwm_board/Position.msg
[ 43%] Generating Python code from SRV i2cpwm_board/ServosConfig
[ 44%] Generating Javascript code from i2cpwm_board/StopServos.srv
[ 45%] Generating EusLisp code from i2cpwm_board/PositionArray.msg
[ 45%] Built target i2cpwm_board_generate_messages_nodejs
[ 46%] Generating Python code from SRV i2cpwm_board/DriveMode
[ 47%] Generating Lisp code from i2cpwm_board/Servo.msg
[ 48%] Generating EusLisp code from i2cpwm_board/IntValue.srv
[ 50%] Generating Lisp code from i2cpwm_board/ServoArray.msg
[ 51%] Generating Python code from SRV i2cpwm_board/StopServos
[ 52%] Generating Lisp code from i2cpwm_board/ServoConfig.msg
[ 53%] Generating EusLisp code from i2cpwm_board/ServosConfig.srv
[ 54%] Generating Python msg init.py for i2cpwm_board
[ 55%] Generating Lisp code from i2cpwm_board/ServoConfigArray.msg
[ 56%] Generating Lisp code from i2cpwm_board/Position.msg
[ 57%] Generating EusLisp code from i2cpwm_board/DriveMode.srv
[ 58%] Generating Python srv init.py for i2cpwm_board
[ 60%] Linking CXX shared library /home/giovanni/catkin_ws/devel/lib/libspot_micro_kinematics.so
[ 61%] Generating Lisp code from i2cpwm_board/PositionArray.msg
[ 61%] Built target i2cpwm_board_generate_messages_py
[ 62%] Generating EusLisp code from i2cpwm_board/StopServos.srv
[ 63%] Generating Lisp code from i2cpwm_board/IntValue.srv
[ 65%] Built target gtest_main
[ 66%] Built target moveit_converter_generate_messages_cpp
[ 67%] Generating Lisp code from i2cpwm_board/ServosConfig.srv
[ 68%] Built target moveit_converter_generate_messages_nodejs
[ 68%] Built target spot_micro_kinematics
[ 70%] Built target i2cpwm_board_generate_messages_eus
[ 72%] Built target moveit_converter_generate_messages_py
[ 73%] Built target moveit_converter_generate_messages_lisp
[ 74%] Generating Lisp code from i2cpwm_board/DriveMode.srv
[ 75%] Generating Lisp code from i2cpwm_board/StopServos.srv
[ 77%] Built target moveit_converter_generate_messages_eus
Scanning dependencies of target i2cpwm_board
Scanning dependencies of target smfsm
[ 78%] Building CXX object spotMicro/ros-i2cpwmboard/CMakeFiles/i2cpwm_board.dir/src/i2cpwm_controller.cpp.o
Scanning dependencies of target test_spot_micro_leg
[ 78%] Built target i2cpwm_board_generate_messages_lisp
[ 80%] Building CXX object spotMicro/spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_state.cpp.o
[ 81%] Building CXX object spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o
[ 82%] Building CXX object spotMicro/spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_idle.cpp.o
[ 83%] Linking CXX executable test_spot_micro_leg
/home/giovanni/catkin_ws/src/spotMicro/ros-i2cpwmboard/src/i2cpwm_controller.cpp: In function ‘int _load_params()’:
/home/giovanni/catkin_ws/src/spotMicro/ros-i2cpwmboard/src/i2cpwm_controller.cpp:1567:1: warning: no return statement in function returning non-void [-Wreturn-type]
1567 | }
| ^
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_global_coordinates_Test::TestBody()': test_spot_micro_leg.cpp:(.text+0x3a9): undefined reference to
testing::internal::DoubleNearPredFormat(char const*, char const*, char const*, double, double, double)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x41b): undefined reference to testing::internal::DoubleNearPredFormat(char const*, char const*, char const*, double, double, double)' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x48d): undefined reference to
testing::internal::DoubleNearPredFormat(char const*, char const*, char const*, double, double, double)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x4f1): undefined reference to testing::Message::Message()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x521): undefined reference to
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x52c): undefined reference to testing::internal::AssertHelper::operator=(testing::Message const&) const' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x534): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x561): undefined reference to testing::Message::Message()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x591): undefined reference to
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x59c): undefined reference to testing::internal::AssertHelper::operator=(testing::Message const&) const' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x5a4): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x5d1): undefined reference to testing::Message::Message()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x601): undefined reference to
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x60c): undefined reference to testing::internal::AssertHelper::operator=(testing::Message const&) const' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0x614): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_local_coordinates_Test::TestBody()': test_spot_micro_leg.cpp:(.text+0x9d6): undefined reference to
testing::internal::DoubleNearPredFormat(char const*, char const*, char const*, double, double, double)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xa7a): undefined reference to testing::internal::DoubleNearPredFormat(char const*, char const*, char const*, double, double, double)' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xb1d): undefined reference to
testing::internal::DoubleNearPredFormat(char const*, char const*, char const*, double, double, double)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xb81): undefined reference to testing::Message::Message()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xbb3): undefined reference to
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xbbe): undefined reference to testing::internal::AssertHelper::operator=(testing::Message const&) const' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xbc6): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xbf1): undefined reference to testing::Message::Message()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xc23): undefined reference to
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xc2e): undefined reference to testing::internal::AssertHelper::operator=(testing::Message const&) const' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xc36): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xc61): undefined reference to testing::Message::Message()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xc93): undefined reference to
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xc9e): undefined reference to testing::internal::AssertHelper::operator=(testing::Message const&) const' /usr/bin/ld: test_spot_micro_leg.cpp:(.text+0xca6): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_global_coordinates_Test::~setFootPos_global_coordinates_Test()': test_spot_micro_leg.cpp:(.text._ZN34setFootPos_global_coordinates_TestD2Ev[_ZN34setFootPos_global_coordinates_TestD5Ev]+0xf): undefined reference to
testing::Test::~Test()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_global_coordinates_Test::~setFootPos_global_coordinates_Test()': test_spot_micro_leg.cpp:(.text._ZN34setFootPos_global_coordinates_TestD0Ev[_ZN34setFootPos_global_coordinates_TestD5Ev]+0x13): undefined reference to
testing::Test::~Test()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_local_coordinates_Test::~setFootPos_local_coordinates_Test()': test_spot_micro_leg.cpp:(.text._ZN33setFootPos_local_coordinates_TestD2Ev[_ZN33setFootPos_local_coordinates_TestD5Ev]+0xf): undefined reference to
testing::Test::~Test()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_local_coordinates_Test::~setFootPos_local_coordinates_Test()': test_spot_micro_leg.cpp:(.text._ZN33setFootPos_local_coordinates_TestD0Ev[_ZN33setFootPos_local_coordinates_TestD5Ev]+0x13): undefined reference to
testing::Test::~Test()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function testing::internal::TestFactoryImpl<setFootPos_local_coordinates_Test>::CreateTest()': test_spot_micro_leg.cpp:(.text._ZN7testing8internal15TestFactoryImplI33setFootPos_local_coordinates_TestE10CreateTestEv[_ZN7testing8internal15TestFactoryImplI33setFootPos_local_coordinates_TestE10CreateTestEv]+0x1c): undefined reference to
testing::Test::Test()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function testing::internal::TestFactoryImpl<setFootPos_global_coordinates_Test>::CreateTest()': test_spot_micro_leg.cpp:(.text._ZN7testing8internal15TestFactoryImplI34setFootPos_global_coordinates_TestE10CreateTestEv[_ZN7testing8internal15TestFactoryImplI34setFootPos_global_coordinates_TestE10CreateTestEv]+0x1c): undefined reference to
testing::Test::Test()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_global_coordinates_Test::TestBody() [clone .cold]': test_spot_micro_leg.cpp:(.text.unlikely+0x4): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text.unlikely+0x33): undefined reference to testing::internal::AssertHelper::~AssertHelper()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text.unlikely+0x62): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function setFootPos_local_coordinates_Test::TestBody() [clone .cold]': test_spot_micro_leg.cpp:(.text.unlikely+0x92): undefined reference to
testing::internal::AssertHelper::~AssertHelper()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text.unlikely+0xc1): undefined reference to testing::internal::AssertHelper::~AssertHelper()' /usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:test_spot_micro_leg.cpp:(.text.unlikely+0xf0): more undefined references to
testing::internal::AssertHelper::~AssertHelper()' follow
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function testing::internal::SuiteApiResolver<testing::Test>::GetSetUpCaseOrSuite(char const*, int)': test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci]+0x28): undefined reference to
testing::internal::IsTrue(bool)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci]+0x6a): undefined reference to testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int)' /usr/bin/ld: test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci]+0xe7): undefined reference to
testing::internal::GTestLog::~GTestLog()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE19GetSetUpCaseOrSuiteEPKci]+0x11f): undefined reference to testing::internal::GTestLog::~GTestLog()' /usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function
testing::internal::SuiteApiResolvertesting::Test::GetTearDownCaseOrSuite(char const*, int)':
test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci]+0x28): undefined reference to testing::internal::IsTrue(bool)' /usr/bin/ld: test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci]+0x6a): undefined reference to
testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int)'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci]+0xe7): undefined reference to testing::internal::GTestLog::~GTestLog()' /usr/bin/ld: test_spot_micro_leg.cpp:(.text._ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci[_ZN7testing8internal16SuiteApiResolverINS_4TestEE22GetTearDownCaseOrSuiteEPKci]+0x11f): undefined reference to
testing::internal::GTestLog::~GTestLog()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o: in function _GLOBAL__sub_I__ZN33setFootPos_local_coordinates_Test10test_info_E': test_spot_micro_leg.cpp:(.text.startup+0x97): undefined reference to
testing::internal::GetTestTypeId()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text.startup+0xfa): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' /usr/bin/ld: test_spot_micro_leg.cpp:(.text.startup+0x172): undefined reference to
testing::internal::GetTestTypeId()'
/usr/bin/ld: test_spot_micro_leg.cpp:(.text.startup+0x1d1): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' /usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:(.data.rel.ro._ZTI33setFootPos_local_coordinates_Test[_ZTI33setFootPos_local_coordinates_Test]+0x10): undefined reference to
typeinfo for testing::Test'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:(.data.rel.ro._ZTI34setFootPos_global_coordinates_Test[_ZTI34setFootPos_global_coordinates_Test]+0x10): undefined reference to typeinfo for testing::Test' /usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:(.data.rel.ro._ZTV33setFootPos_local_coordinates_Test[_ZTV33setFootPos_local_coordinates_Test]+0x20): undefined reference to
testing::Test::SetUp()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:(.data.rel.ro._ZTV33setFootPos_local_coordinates_Test[_ZTV33setFootPos_local_coordinates_Test]+0x28): undefined reference to testing::Test::TearDown()' /usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:(.data.rel.ro._ZTV34setFootPos_global_coordinates_Test[_ZTV34setFootPos_global_coordinates_Test]+0x20): undefined reference to
testing::Test::SetUp()'
/usr/bin/ld: CMakeFiles/test_spot_micro_leg.dir/tests/test_spot_micro_leg.cpp.o:(.data.rel.ro._ZTV34setFootPos_global_coordinates_Test[_ZTV34setFootPos_global_coordinates_Test]+0x28): undefined reference to testing::Test::TearDown()' /usr/bin/ld: ../../../../lib/libgtest_main.so: undefined reference to
testing::UnitTest::GetInstance()'
/usr/bin/ld: ../../../../lib/libgtest_main.so: undefined reference to testing::UnitTest::Run()' /usr/bin/ld: ../../../../lib/libgtest_main.so: undefined reference to
testing::InitGoogleTest(int*, char**)'
collect2: error: ld returned 1 exit status
make[2]: *** [spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/test_spot_micro_leg.dir/build.make:87: spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/test_spot_micro_leg] Errore 1
make[1]: *** [CMakeFiles/Makefile2:2042: spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp/CMakeFiles/test_spot_micro_leg.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....
[ 84%] Building CXX object spotMicro/spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_stand.cpp.o
[ 86%] Building CXX object spotMicro/spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_transition_idle.cpp.o
[ 86%] Building CXX object spotMicro/spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_transition_stand.cpp.o
[ 87%] Building CXX object spotMicro/spot_micro_motion_cmd/CMakeFiles/smfsm.dir/src/smfsm/spot_micro_walk.cpp.o
[ 88%] Linking CXX executable /home/giovanni/catkin_ws/devel/lib/i2cpwm_board/i2cpwm_board
[ 88%] Built target i2cpwm_board
[ 90%] Linking CXX shared library /home/giovanni/catkin_ws/devel/lib/libsmfsm.so
[ 90%] Built target smfsm
make: *** [Makefile:141: all] Errore 2
Invoking "make -j4 -l4" failed
`
Any idea of what the issue can it be?
Regards.
Create a change log to summarize major changes, and give awareness about changes that could impact users
Setup AMCL for robot localization against an apriori generated map. Tune any parameters as needed to get good localization performance.
Use the chosen solution from #54 as the odometry source.
Make the alternate gait selectable via config parameter in the main code repo so a seperate branch does not need to maintained for it.
Update documentation
Hello Mike,
I read your code, there are some places I don't understand。
do you have any papers that can refer to,
thank you!!
Explicitly define the robot's coordinate system and add a graphic illustrating the coordinate system in the README
This will be hard because hardware i2c can't be used due to a RPi hardware limitation regarding i2c clock stretching.
Possible options:
Publish the robot's state, including state of the lidar scanner, using ROS's tf2 transforms.
This could either be implemented manually by direct publishing of tf2 messages, or by using ROS's robot state publisher to publish transformation defining the robot's state. The disadvantage of the latter method is that a urdf file ends up defining the robot, and this file seems hard to manipulate and understand.
Add documentation as necessary.
Thank you for sharing your outstanding project!
Can you tell me how you get to the parameters and how the direction of rotation of the servos is taken into account. I am experimenting with MG92b servos, which unfortunately do not all have the same direction of rotation.
RF_3: {num: 1, center: 306,range: 385, direction: 1, center_angle_deg: 84.0}
I hope I have understood it correctly.
Here the motor turns from the center position (= 90 degrees) by another 84 degrees in positive direction of rotation (counterclockwise), which is the idle position. What does the range say in this context?
Thanks in advance
Steffen
Hey Mike, I am using mg996r servos in my robot. I have followed the calibration instructions given by you. But what are the angles between shoulder and knee links when the servos are at their neutral stance ?
I am getting this error while running the command roslaunch spot_micro_lauch motion_control_and_hector_slam.launch
RLException: [motion_control_and_hector_slam.launch] is neither a launch file in package [spot_micro_lauch] nor is [spot_micro_lauch] a launch file name
The traceback for the exception was written to the log file
the build was successful. without any errors.
I have sourced my workspace. using source devel/setup.bash.
please help me in resolving this issue.
Hello again, t see that he code mentions a PS4 Controller, can you please give a hint how to use it?
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
leon@leon-desktop:$ sudo i2cdetect -y 1$
[sudo] password for leon:
Error: Could not open file /dev/i2c-1' or
/dev/i2c/1': No such file or directory
leon@leon-desktop:
Also, you are running the i2cpwmboard on the raspberry pi right? And not on your PC?
pi b3
roslaunch servo_move_keyboard keyboard_move.launch
...
setting /run_id to c3180844-941a-11eb-b0be-b827eb8897a3
process[rosout-1]: started with pid [3482]
started core service [/rosout]
process[servo_move_keyboard_node-2]: started with pid [3485]
[INFO] [1617412834.089777]: > Servos corrrectly initialized
[INFO] [1617412834.107231]: > Publisher corrrectly initialized
[INFO] [1617412834.116593]: Initialization complete
Servo Control Module for 12 Servos.
quit: stop and quit the program
oneServo: Move one servo manually, all others will be commanded to their center position
allServos: Move all servo's manually together
q y
f g j k
z x b n m
q: Quit current command mode and go back to Option Select
z: Command servo min value
y: Command servo center value
x: Command servo max value
f: Manually decrease servo command value by 10
g: Manually decrease servo command value by 1
j: Manually increase servo command value by 1
k: Manually increase servo command value by 10
b: Save new min command value
n: Save new center command value
m: Save new max command value
anything else : Prompt again for command
CTRL-C to quit
Command?:
I don't know how to choose the server number or load the parameter.
Is there a link?
Rename idle state to sit state to more accurately represent it
Instead of hosting a copy of the ROS servo control package for the PCA9685, make it a git submodule instead.
oh oops, I just missed a line on the Readme, don't mind me! Not sure how to delete an issue haha
Configure local planner settings to support autonomous nav. See: http://wiki.ros.org/navigation/Tutorials/RobotSetup
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/catkin_ws/src$ git pull https://github.com/mike4192/spotMicro
Initialized empty Git repository in /home/leon/catkin_ws/src/.git/
leon@ubuntu:
now the file and directory is as follow:
`leon@ubuntu:~/catkin_ws/src$ ls ros-i2c*
leon@ubuntu:/catkin_ws/src$ ls/catkin_ws/src$`
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:
leon@ubuntu:/catkin_ws$ git submodule update --init --recursive/catkin_ws$ sudo apt-get install libi2c-dev
fatal: Not a git repository (or any of the parent directories): .git
leon@ubuntu:
[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'?
Do you have a wiring diagram for how you hooked up the Pi and servo controllers?
I have worked in a version for UBUNTU 20.4 and ROS NOETIC, both of them LTS version, with support until 2025.
Furthermore, NOETIC uses python 3 by default, once python 2.7 is deprecated.
It is 100% functional, resulting faster and with long term support, also it will make much easer migrate to ROS 2, if it is the choice.
Instead create a fork to work in it, if you agree, I can share all changes and the final code, which we could mainting as collaborators.
Deprecate the spot_micro_simple_command and spot_micro_walk packages. These are python package for issuing basic orientation commands, and the initial attempt at implementing a walking gait, respectively. Both are since superseded by the c++ based spot_micro_motion_command.
Before deprecating, tag the repo as v0.1 to save a snapshot of them as a tag.
Update package so required nodes can be easily launched via launch files.
For example, have one launch file for launching nodes onboard raspberry pi, and another launch file for launching utilities on a PC.
Update documentation.
so being 13, i don't get everything about this project. like, how to charge the battery. the battery comes with a charger, but to connect it directly to the servo control board means i have to snip off the connector thing. and then i cant charge it. do i have to buy a connector to mount on to the board? another one is, how do you control it via laptop or other device? i saw in the video that you were using a laptop to control Spot Micro, and i was wondering, was that just a bluetooth connection? or was it another linux device? Thanks a bunch!
Improve the body shift motions that occur with the 8 phase gait. Currently these motions are discreet movements which occur in between leg swing cycles (so they occur when all four legs are on the ground).
For example, the sequence is something like
The body shifting can probably be implemented as a smooth motion that occurs continuously during walking. This would probably smooth walking motion overall and allow faster walking speeds to be attained for this gait. A solution would potentially reduce the gait to 4 phases, with body motion being handled separately.
Hi, I've built two of these robots, one with and one without the shoulders. We're using TowerPro MG996R servos and, while the robots can both stand fine, they can not get up without assistance, and once they start walking they will also fall.
I can't tell if the poor performance is due to the servo torque not being high enough or due to a calibration issue .. The PCA9685 is receiving 5.3V but the voltage also varies throughout for every pin due to inherent drops across the board .. the 470uF cap might night be that strong either.
According to the datasheet, the MG996R has a stall torque around 10 kg-cm at 5.3V.
The PDI-HV5523MG, on the other hand, has a stall torque around 18 kg-cm at 5.3V.
This may explain why my servos are stalling out while other builders that use the latter servos are doing fine. However, the original KDY short-body seems to use MG996R, though there is a later revision for CLS6336HV which have a much higher stall torque. https://spotmicroai.readthedocs.io/en/latest/originalReadme/
So .. do I have to buy these expensive servos???
https://www.electronicoscaldas.com/datasheet/MG996R_Tower-Pro.pdf
http://www.jx-servo.com/en/Product/STANDARD/SD/550.html
Pull in an existing spot micro urdf file defining the robot model.
This may be used either for visual only, or in combination with robot state publisher to publish the robot's state as tf2 messages.
dear mike:
thanks for your excellent work,but i have 2 problems after strict calibration.
the 1st one is when the spotmicro is standing or walking, all the shoulders lean in the same direction,such like the picture.
the 2nd problem is its right lower leg is always higher than other legs, so it doesn't provide force while standing and walking.
i have no idea how to solve these problems after calibration for many times even use a protractor following your documentation strictly.
Any advice is much appreciated! And I really enjoy this project!
I modified some of KDY's parts to improve joint stability for the shoulder joint (in the original model, it is supported only on one side of it's axis). This issue is to add my custom parts (or links to them on thingverse) and some description of how to print them, and additional hardware required.
Mike,
First off, thank you for contributing and actively responding to this awesome project. I have a question about the servo config file and, my implementation of controlling the servos.
My status: I've 3D printed a spot micro, with some cls6336HV servos. Everything's put together, running a Pi 3B and ros melodic with your code (slightly modified). I am using a Pololu Maestro controller (18 channels) instead of your PCA board. I've modded your code to allow me to control any of the 18 channels on the maestro (but see question 2), and I can correctly control any servo from the servo calibration python script.
Question 1: After running through the calibration steps, most of the calculated angles for my servos are generally close to your example config file. However, my lines for Right Back Lower Leg and Left Back Lower Leg appear drastically different. My calculated center angles are 47.87 (yours is 90.42), and -32.76 (yours is -84.08), respectively. When I try to run the servoMoveKeyboard script, I see debug warnings about Joint LB_3, pretty big coincidence. But I have double checked my calibration measurements...any idea what might be going on? The legs do appear to move correctly to a stand position, but the warnings are that the Proportional Command is below -1.0 and is being clipped to -1.0 (the angle is very negative, approx -120). Seems like that should be way beyond what the servo should be going, if I am supposed to be calibrating between 0 and -90 values...
Question 2: The servo wires inside the spot micro are tight, and I'm choosing to use the Maestro channels 0-5 for the rear legs, and channels 12-17 for the front legs. Your code seems to be written for 12 servo channels only (on a PCA), and they must be in the first 12 channel positions on your 16 channel PCA. I've already modded your code to allow for 18 channels, but the discontinuous "array" is causing warnings about non-configured servos (because of the gap). Can I just remove those warnings in the servo controller ros node, or are there other dependencies I need to address?
Again, thanks for your hard work and contributions!
Greg
Hi Mike,
I would like to post these issues I encountered trying to run your code. I don't know if these issues are particular to my setup or general but suspect the latter. Hoping this would make things easier for some people.
My key hardware, RPi3 and servo, are the same as yours. I also use ubiquity robotics image as you suggested. I would strongly recommend this to others as well because this path has less pain. Here are the issues.
1. No git submodules cloning permission
Symptom:
danny@Linux-HP-Laptop:~/Test$ git clone --recurse-submodules https://github.com/mike4192/spotMicro.git
Cloning into 'spotMicro'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 892 (delta 5), reused 12 (delta 3), pack-reused 874
Receiving objects: 100% (892/892), 7.63 MiB | 6.34 MiB/s, done.
Resolving deltas: 100% (498/498), done.
Submodule 'spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp' ([email protected]: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' ([email protected]:mike4192/spot_micro_kinematics_python.git) registered for path 'spot_micro_plot/scripts/spot_micro_kinematics_python'
Cloning into '/home/danny/Test/spotMicro/spot_micro_motion_cmd/libs/spot_micro_kinematics_cpp'...
Warning: Permanently added the RSA host key for IP address '140.82.112.3' to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Solution: change .gitmodules to use public url as suggested by this post. https://stackoverflow.com/questions/8197089/fatal-error-when-updating-submodule-using-git
2. Missing i2c_smbus lib in Ubuntu 16.04(later version doesn't have it either)
Symptom: catkin_make would produce compile error.
Errors << i2cpwm_board:make /home/pi/catkin_ws/logs/i2cpwm_board/build.make.000.log
/home/pi/catkin_ws/src/spotMicro/ros-i2cpwmboard/src/i2cpwm_controller.cpp: In function ‘void _set_pwm_frequency(int)’:
/home/pi/catkin_ws/src/spotMicro/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 (_controller_io_handle, __MODE1);
^~~~~~~~~~~~~~~~~~~~~~~~
Solution: sudo apt install libi2c-dev
3. Note for using servoMoveKeyboard.py in servo calibration
Symptom: Servo position cannot be set beyond 255 and servo behaves erratic. This is caused by my lack of understanding of how the different ROS services interact.
Solution: spot_micro_motion_cmd cannot be active at the same time since it will send msg to control servos causing conflict with servoMoveKeyboard,py. They are exclusive services. Only one should be active at a time.
That's all.
Thanks again for sharing your code.
Not sure what is going on but it doesn't copy with the clone and when I try and sync dependencies I get a permissions error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.