Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remapping controller #46

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open

Remapping controller #46

wants to merge 67 commits into from

Conversation

JackZautner
Copy link
Contributor

Remapped the controller

bennowotny and others added 30 commits March 22, 2021 18:53
… tested the SimpleActionServer with MoveIt configuration in the demo_test.launch wroboarm_21 launch file. MoveIt confirmed to be talking to the server and hearing the A-OK message.
…/avoid repitition on the details of driving to a position and setting power.
…plicate definition, include all methods used, and compile.
…needed for publishing Joint State data and to compile ArmControlSystem.cpp and ArmMotor.cpp together.
…nt16 and not UInt16. Patched the warning of integer overflow for the COUNTS_PER_ROTATION constant.
* Actually added the Arm MoveIt files this time.

* Added a wr_control_arm package.

* Created the Action server file.

* Added ArmControlSystem source file with default logic for a simple action server.

* Added wr_control_arm package build files, currently debugging a build error on catkin_make.

* Build succeeds on changes logged.

* Recompiled wroboarm_21 for ROS package detection.

* Added a RViz launch file to test MoveIt/WRobot integration.

* Moved wr_control_arm to pre-existing package wr_control_drive_arm and tested the SimpleActionServer with MoveIt configuration in the demo_test.launch wroboarm_21 launch file.  MoveIt confirmed to be talking to the server and hearing the A-OK message.

* Added an ArmMotor class to represent the per motor logic and abstract/avoid repitition on the details of driving to a position and setting power.

* More progress on ArmMotor.cpp, implemented simple runToTarget methods and server actions.

* Control loop added, missing ROS logic (spins and such) and publishing TF/Joint State data.

* Added framework of publishing Joint State data.

* Moved and resorted the CMakeLists and package files for the arm and science control subsystems.

* Modified the demo_test.launch file to run the 'real' robot and read joint states from the right source.

* Updated source code to correctly implement header functions, avoid duplicate definition, include all methods used, and compile.

* Modified CMakeLists and package.xml to depend on the new sensor_msgs needed for publishing Joint State data and to compile ArmControlSystem.cpp and ArmMotor.cpp together.

* Re-referenced the wroboclaw topics; wroboclaw topics aren't spelled with the leading 'w'.

* Updated motor power message types for the arm control system to use Int16 and not UInt16.  Patched the warning of integer overflow for the COUNTS_PER_ROTATION constant.

* Updated ArmMotor to fix ArmControlSystem encoder issue; patch reached by making the ArmMotor array into an ArmMotor* array, which avoids instantiation entirely until necessary.

* Modified the ArmMotor constructor to accept NodeHandle pointers rather than NodeHandles themselves.

* Changed ArmMotor constructor parameter error messages to more accurately reflect the problem described.

* Changed ArmMotor rad->enc and enc->rad methods to accurately compute the radians or encoders on their proper bounds, moved the two methods closer for readability.

* Updated encoder math to reflect the boundries of the encoders and use the right datatypes to encapsulate the values; made the encoder bounds and COUNTS_PER_ROTATION into static constant variables.

* Updated encoder datatypes to reflect C++ standard for data size requirement.

* Added test launch script for the arm control stack.

* Removed noisy debugging code from ArmControlSystem.cpp; errors not removed with it.

* Modified the encoder/radian transformation to actually modify the actual transformation desired in accordance with the tests here: https://www.desmos.com/calculator/j8zidhiefy

* Modified the formulas again due to C++ negative modulus behaviour.  Added some moderately noisy but tolerable debugging information.

* Added a sleep rate for realism for the actual robot, amped the speed of the arm for testing purposes.

* Improved readability of ArmControlSystem.cpp.

* Added an Euclidean-correct modulus function for mathematical consistency and updated the rad<->enc conversion functions to be consistent with https://www.desmos.com/calculator/nwxtenccc6.

* Updated `COUNTS_PER_ROTATION` to be the actual UINT32 limit; apparently UINT_FAST32 is something else.

* Updated the default encoder tolerance to statically reflect ±0.1 degree tolerance w.r.t. the `COUNTS_PER_ROTATION`.

* Added the `time_warp` parameter to the mock launch file in anticipation of WisconsinRobotics/wroboclaw#2.

* Updated the demo_test.launch file to disable trajectory execution timeouts.  This could be replaced in the future with the multiplier parameter `move_group/trajectory_execution/allowed_execution_duration_scaling` that extends the execution timout by a scalar multiplier or `move_group/trajectory_execution/allowed_goal_duration_margin` for adding a fixed time tolerance to motions.

* Updated the Arm Control stack test script to re-navigate back to the original directory, regarless of where the script was called.

* Updated encoder data types to reflect the amount of data stored in them (x64 processors default to 32 bits/integer).

* Updated the roboclaw_mock launch file and the roboclaw_enc config file to be prepared for the new implementation of WisconsinRobotics/wroboclaw#2.

* Started documentation, removed unneccesary checks from the code.

* Continued documentation, removed use of `temp` variable to track if the current position is completed as the value can be stored in the existing variable already.

* Continued documentation, added `TODO`s for future work.

* Continued documentation.

* Updated documentation to be doxygen-compatible.

* Updated Doxygen link.

* Added ArmMotor.hpp doxygen documentation, removed unneeded methods.

* Added doxygen comments to ArmMotor.cpp, removed unecessary methods and logic.

* Updated ArmMotor::corrMod to a simpler implementation.

* Added velocity scaling to the arm, assumed speed 0.1 on the last motion.  Added debugging information relavant to velocity scaling.

* Added TODO for future type conversion

The future type conversion creates platform independence, since only 64 bit processors have 32 bit integers. (32 bit processors would throw errors)

* Updated TODO by migrating encoder data types to `uint32_t` for platform independence.

* Added a signal handler to kill the action server if `^C` or `SIGINT` signal is given.

* Adding support for PID position control to arm joints.

* Updated PID calculation method to use radians instead of encoder counts, resolved pointer-based error occurring when server.setSucceeded is called.

* Updating the arm URDF files to contain joint limits to prevent overturning.

* Adding rqt_plot to the arm launch script to see joint state data and controller responses.

* Adding support for PID control, post-testing.

* PID Tuning.

* Updated arm teleop logic, currently segfaults.

* Added the arm teleop file (the one that currently segfaults).

* Added a 'control' group tag to the wr_control_drive_arm nodes for organization.

* Added effective `rosrun` control to wr_logic_teleop_arm.

* Modified the ArmTeleopLogic system to plan to a predetermined spot and move there.  Confirmed to work.

* Removed the visual to set the goal of the arm from the RViz layout for cleanliness.

* Modified stepping logic and how the test simulation works.

* Disabled `rqt_plot` tracking by comment, lengthened the timing to start the ArmTeleopLogic `rosrun`.

* Adding the `apt` dependency to `ros-noetic-moveit` to the build script.

* Added controller functionality for the Arm (yay!).  Tested with XBox-like controller.

* Adding rotational logic and controller support.

* Updating rotation calculations to no transformations.

* fixed drive science cmake files

* fixed teleop bug, changed vel/accel scaling, rviz panels hidden by default

* Removed Yaw(i think and some basic configuration)

* atomic reference trigger

* fixed cached msg bug - TOFIX: isDone not functioning correctly

* fixed blocked planning, bad state info w/ async plan method

* working dummy link

* Added link 7 to some places and chmod file

* dummy axis fully integrated in IK

* c++ pointers are dumb

* added redundant linear transformation function

* add differential transmission

* Using ssh instead of git to pull.

* Working model.

* Dev/arm stall (#19) (#20)

* header for differential joint class

* joint progress: non functional

* simple joint compiles, does not work

* differential joint - compiles - untested

* position handoff is working, velocity untested

* gpp is very unhappy

* almost

* added checks for stall in ArmMotor and up

* debugging

* debugging: fixed issues with incompatible variables, added TODO in execute method of ArmControlSystem

* Updated implementation incorporating actual motor current publishers

* Began services

* More service/client implementation and comments

* Dev/differential joint (#18)

* compiles

* execution working, error with wrist  matrix

* fully functional - need mocked writst logic

* Dev/new urdf (#17)

* model working, trajectory data if wrong

* working :)

* good joint limits

* controller mapping changes

* simple joint abstraction workging with new model

* differentail joint working

* fixed entry point launch file conflicts

* fixed teleop bug and combined arm test into one launch file

* Arm viz (#16)

* added motor specfic bound + offset for arm

* mocked roboclaws working with new encoders

* fixed encToRad

* ready to test

* fixed launch files

* fixed diff joint encoder reading

* Config file and setup changes due allow robot to run normally, and then add visualization on top.  There are pending logical and setup errors in at minimum ArmControlSystem.cpp that must be fixed prior to testing.

* debugging for publish()

* Updating `corrMod` implementation.

* lint

* lint-b-gone

* liiiiiiiiiiiint

* Tuning/preliminary homing updates.

* Parameterizing offset/ratio parameters for the arm.  Initializing default position to be offset ("home").

* Further tuning updates.

Co-authored-by: Nicholas Underwood <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>
Co-authored-by: Arthur Wang <[email protected]>

Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Nicholas Underwood <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>
Co-authored-by: Arthur Wang <[email protected]>

Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Nicholas Underwood <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>
Co-authored-by: Arthur Wang <[email protected]>

Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Arthur Wang <[email protected]>
Co-authored-by: Nicholas Underwood <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>

Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Arthur Wang <[email protected]>
Co-authored-by: Nicholas Underwood <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>

Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Dev <[email protected]>
Co-authored-by: Arthur <[email protected]>
Co-authored-by: Arthur Wang <[email protected]>
Co-authored-by: Nicholas Underwood <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>
* Some lint

* Finished de-linting ArmMotor

* Incomplete de-linting on ArmControlSystem

* mispelling

* First round de-linting of AbstractJoint

* Redo-ing some lint with an additional `clang-tidy` options

* Committing settings for linter.  Discussions to be had on whether or not they should be removed prior to merge.

* Continuing to work on the `DifferentialJoint` de-linting

* More differential joint refactoring?

* Adding more TODO remarks and modifying method signatures to add `const` to parameters.

* Formatting

* Refactoring

* Undo changes to settings.json

* AbstractJoint signature changes.

* AbstractJoint de-linting

* DifferentialJoint de-linted.

* De-linting SimpleJoint

* Finished first-pass linting, not building

* Updating to C++17 to resolve static storage issues.

* Removing unused method/minor refactoring.

* Able to roll back C++ version to auto-deduced 14, resolved linker error.

* Arm Encoder Tuning

* Updating wrist tracking logic.

* Updating wrist tracking logic.

* Added movit-visual-tools to project.json

* Updated pitch math (turns out it was a direct reading all along).

* Modifying speed handling in the arm and holding PID-enabled/`RUN_TO_POSITION` status.

* added class headers

* Removed outdated comments

Co-authored-by: WR-BaseStation <[email protected]>
Co-authored-by: Ben Nowotny <[email protected]>
Tzanccc and others added 29 commits November 14, 2022 20:07
…pplication

Joint state publisher application
* Starting to implement new design

* Continuing implementation, doing simple parts first to remove big issues

* Further implementation

* Only Differential stuff and mains left

* Up to mains complete

* Removing old arm motor files, still in VC for reference

* Fixed duplicating copies, need to resolve further

* Fixed copying by allowing safer copying.  Need to double check path planning

* All fixed up.  Added test script

* Additional changes, some motion planning is possible, need to refine motor/encoder directions

* Adding direction multipliers to formalize motor reversal in direct speed converters.  Need equivalent for differential speed converters.

* Updating constants

* First autonomous actions on the arm

* Adding legend

* Adjusting parameters

* Tuning joint limits

* Feature/over current fault implementation (#31)

* Added functionality to retrieve over current status, updated build settings

* Added functionality to stop all joints when a motor is over current

* Added implementation for action server to stop when an over current fault is detected

* set mock arm launch to launch the mock roboclaw

* Added functionality to stop the action server when a motor is over current for too long

* Fixed code in compliance with PR

* Address fix in Motor.cpp

* Corresponding const-change in Motor.hpp

* Const-correctness in ArmControlActionServer.cpp

---------

Co-authored-by: Ben Nowotny <[email protected]>

* Removed I terms (need synchronization before we can do that)

---------

Co-authored-by: Ben Nowotny <[email protected]>
Co-authored-by: WR-BaseStation <[email protected]>
Co-authored-by: Ben Nowotny <[email protected]>
…nd joint state publisher to pull correct values from arm params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants