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

Ros1 manager bt update #121

Merged
merged 27 commits into from
Jun 12, 2023
Merged

Conversation

KmakD
Copy link
Contributor

@KmakD KmakD commented May 29, 2023

This PR looks big but most of changes was just moving code around and also it was necessary to merge branch ros1. Main changes were:

  • changed BT project organization
  • added params for launching each tree
  • added BT project for panther v1.06 and below
  • removed scheduler node from panther_lights
  • fixed animation queuing for anim with priority 2 and below

Files to check:

  • panther_manager package
  • panther_bringup/bringup.launch
  • panther_lights/lights.launch
  • panther_lights/controller_node.py - line 307 (this commit: b4149e1)

rafal-gorecki and others added 27 commits April 17, 2023 10:04
* Light dimmer

* Update

* delete debug

* add brake

* fix

* formated

* battery_animation 3 stage

* fix

* add david suggestion

* Update panther_lights/src/animation/battery_animation.py

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

---------

Co-authored-by: aayli <altair1x2@gmail.com>
Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>
* add health info

* Update README.md

* add logs

* add voltage mean count

* update republisher node

* fix typo

* Update panther_battery/src/adc_node.py

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update adc_node.py

* Update roboteq_republisher_node.py

* fix typo

---------

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>
Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>
* fix bug

* Pawel sugestions

---------

Co-authored-by: aayli <altair1x2@gmail.com>
* add motors enable srv

* add reseting can callback times

* disable motors if script reset fails

* working solution

* fix

* IO initial state pth1.05

* remove unneccessary method

* fix type

* update README

* Update panther_power_control/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* review changes

---------

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>
* thread lock

* undo fcn naming

* few more lock

* revert nodes

* Paweł suggestions

* change

* e_stop

---------

Co-authored-by: aayli <altair1x2@gmail.com>
* Use CPP for APA102

* Add color correction

* Utilise gpiod

* Remove ::

* Fix lights after tests

* Fix default pin number

* Add set brightness service

* Invert LED_SBC_SEL pin

* Change SPI mode

* Change clock polarity

* Reduce number of ROS lgger instances

* Celan up code, update to libgpiod 2.0

* Update panther_lights/include/panther_lights/apa102.hpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/lights_driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/lights_driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/include/panther_lights/apa102.hpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Review changes

* Update panther_lights/src/apa102.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Review cleanup

* Add build dependencies

* FIx launchfile

* Update panther_lights/CMakeLists.txt

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/CMakeLists.txt

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/apa102.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Review changes

* Fix inlude order

* Fix references and APA102 constructor

* Add build dependencies for libgpiod v2

* Bring back libgpiod v1

---------

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>
* basic plugin usage - POC

* add rear animation texture

* fix rviz config

* fix .rviz file
@KmakD KmakD requested a review from Kotochleb May 30, 2023 11:27
@rafal-gorecki rafal-gorecki self-requested a review June 1, 2023 10:47
Copy link
Contributor

@rafal-gorecki rafal-gorecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code look fine for me, but I don't know how tree looks like. Could you add image in readme?
I will test it on Panther in Monday.

panther_manager/launch/manager_bt.launch Show resolved Hide resolved
panther_manager/src/manager_bt_node.cpp Show resolved Hide resolved
@rafal-gorecki
Copy link
Contributor

Zmiany przetestowane, nie zauważono błędów.

@rafal-gorecki rafal-gorecki merged commit 3a19fdb into ros1-panther-manager-bt Jun 12, 2023
@rafal-gorecki rafal-gorecki deleted the ros1-manager-bt-update branch June 12, 2023 07:11
Kotochleb added a commit that referenced this pull request Jul 25, 2023
* BT manager node draft (#100)

* BT manager node draft

* rename package | add AsyncSpinner

* update package version

* ROS 1 manager bt add basic plugins (#101)

* add basic ROS service plugins

* improve logging and naming

* Ros1 manager bt create basic trees (#104)

* create basic trees and update plugins

* update README | small fixes

* change shutdown nodes to stateful

* change param naming

* fix shutdown hosts node

* small fixes

* Update panther_manager/include/panther_manager/moving_average.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/moving_average.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/plugins/action/shutdown_hosts_from_file_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/shutdown_host_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/README.md

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/config/PantherManagerBT.xml

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/config/PantherManagerBT.xml

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/config/PantherManagerBT.xml

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* review fixes

* move nh | change set up tree method

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/src/manager_bt_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/plugins/action/call_trigger_service_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/plugins/action/call_trigger_service_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/plugins/action/call_set_led_animation_service_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/plugins/ros_service_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* review changes

* moving average initial value

* Update panther_manager/include/panther_manager/plugins/ros_service_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* use bat percent average

* update includes | unify sleep

* review fixes

* README draft

* moving average unique ptr

* Update panther_manager/include/panther_manager/manager_bt_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/manager_bt_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/plugins/action/call_set_led_animation_service_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/plugins/action/call_trigger_service_node.cpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/moving_average.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* review fixes

* fix moving avg | review fixes

---------

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* ros plugin | pass nh by reference (#116)

* ros plugin | pass nh by reference

* formating

* Ros1 manager bt signal shutdown (#117)

* add SignalShutdown node

* name type

* review fixes

* revert output port

* Ros1 bt shutdown nodes (#114)

* new shutdown structure

* small fixes

* remove old file

* small fix

* review fixes

* move Host class

* add fsm to ShutdownHost

* hosts list as shared_ptr

* change remove duplicates method

* remove shutdown_timeout bb entry

* Update panther_manager/include/panther_manager/plugins/shutdown_hosts_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/plugins/shutdown_host.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update panther_manager/include/panther_manager/plugins/shutdown_hosts_node.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* review fixes

* Update panther_manager/include/panther_manager/plugins/shutdown_host.hpp

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* change ssh_execute_command

* fix

---------

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* update shutdown nodes (#120)

* update shutdown nodes

* review fixes

* review fix

* Ros1 manager bt update (#121)

* Light dimmer (#105)

* Light dimmer

* Update

* delete debug

* add brake

* fix

* formated

* battery_animation 3 stage

* fix

* add david suggestion

* Update panther_lights/src/animation/battery_animation.py

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

---------

Co-authored-by: aayli <altair1x2@gmail.com>
Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* add battery health info (#102)

* add health info

* Update README.md

* add logs

* add voltage mean count

* update republisher node

* fix typo

* Update panther_battery/src/adc_node.py

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update adc_node.py

* Update roboteq_republisher_node.py

* fix typo

---------

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>
Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>

* Update changelog

* 1.0.1

* fix bug (#112)

* fix bug

* Pawel sugestions

---------

Co-authored-by: aayli <altair1x2@gmail.com>

* Update changelog

* 1.0.2

* Ros1 motor enable srv (#113)

* add motors enable srv

* add reseting can callback times

* disable motors if script reset fails

* working solution

* fix

* IO initial state pth1.05

* remove unneccessary method

* fix type

* update README

* Update panther_power_control/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* review changes

---------

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* Update changelog

* 1.0.3

* Thread lock (#110)

* thread lock

* undo fcn naming

* few more lock

* revert nodes

* Paweł suggestions

* change

* e_stop

---------

Co-authored-by: aayli <altair1x2@gmail.com>

* Update changelog

* 1.0.4

* APA102 cpp implementation (#108)

* Use CPP for APA102

* Add color correction

* Utilise gpiod

* Remove ::

* Fix lights after tests

* Fix default pin number

* Add set brightness service

* Invert LED_SBC_SEL pin

* Change SPI mode

* Change clock polarity

* Reduce number of ROS lgger instances

* Celan up code, update to libgpiod 2.0

* Update panther_lights/include/panther_lights/apa102.hpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/lights_driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/lights_driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/include/panther_lights/apa102.hpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Review changes

* Update panther_lights/src/apa102.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Review cleanup

* Add build dependencies

* FIx launchfile

* Update panther_lights/CMakeLists.txt

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/CMakeLists.txt

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/apa102.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update panther_lights/src/driver_node.cpp

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Review changes

* Fix inlude order

* Fix references and APA102 constructor

* Add build dependencies for libgpiod v2

* Bring back libgpiod v1

---------

Co-authored-by: Dawid Kmak <73443304+KmakD@users.noreply.github.com>

* Update changelog

* 1.0.5

* Rviz lights plugin (#111)

* basic plugin usage - POC

* add rear animation texture

* fix rviz config

* fix .rviz file

* Update changelog

* 1.0.6

* check can err (#119)

* Update changelog

* 1.0.7

* update bt project and launch files

* remove scheduler_node

* fix queuing

* remove old variable

---------

Co-authored-by: rafal-gorecki <126687345+rafal-gorecki@users.noreply.github.com>
Co-authored-by: aayli <altair1x2@gmail.com>
Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>
Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>
Co-authored-by: action-bot <action-bot@action-bot.com>

* ROS 1 manager bt dosc (#126)

* update docs

* update docs

* ad medyfying bt section

* update lights tree png

* update README

* Update panther_manager/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* Update panther_manager/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* Update panther_manager/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* Update panther_manager/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* Update panther_manager/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* Update panther_manager/README.md

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* review fixes

---------

Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>

* add battery health check (#141)

* add battery health check

* update readme

* fix typo

* fix args

* Ros1 update bt images (#143)

* add battery health check

* update readme

* fix typo

* fix args

* update README imgs

* update README

* merge fix

* Update fan on/off thresholds (#146)

* install BT from rosdep

* fix rosdep install

* fix manager linking

---------

Co-authored-by: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com>
Co-authored-by: rafal-gorecki <126687345+rafal-gorecki@users.noreply.github.com>
Co-authored-by: aayli <altair1x2@gmail.com>
Co-authored-by: Paweł Kowalski <82044322+pkowalsk1@users.noreply.github.com>
Co-authored-by: action-bot <action-bot@action-bot.com>
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.

4 participants