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

Pr/spot arm/add spot behavior manager #106

Draft
wants to merge 40 commits into
base: spot_arm
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f97aff0
Add spot_ros_client, jsk_spot_behaviors and spot_autowalk_data
sktometometo Jul 5, 2023
ad00e06
[spot_autowalk_data] update metadata for python dependency
sktometometo Jul 6, 2023
380cf68
[jsk_spot_behavior_msgs] rename behavior message package
sktometometo Jul 6, 2023
03e7a3b
[jsk_spot_behavior_graph] rename graph package
sktometometo Jul 6, 2023
062377c
[jsk_spot_behavior_manager] rename to jsk_spot_behavior_manageR
sktometometo Jul 6, 2023
37fa6d1
[spot_ros_client] fix
sktometometo Jul 25, 2023
6960734
[jsk_spot_behavior_graph][jsk_spot_behavior_manager] update
sktometometo Jul 25, 2023
8efed6e
[jsk_spot_behavior_manager] Fix behavior_manager
sktometometo Jul 25, 2023
161a319
[jsk_spot_bheavior_manager] udpate
sktometometo Jul 25, 2023
927bf18
[spot_ros_client] update
sktometometo Jul 25, 2023
2ea8d3d
[jsk_spot_bheavior_manager
sktometometo Jul 25, 2023
e171854
[jsk_spot_behavior_manager] update README
sktometometo Jul 25, 2023
71b1022
[spot_ros_client] update dependency
sktometometo Aug 3, 2023
4568a1e
[spot_autowalk_data] update view_map.py
sktometometo Aug 3, 2023
90968ed
[jsk_spot_behaviors] update behvaiors
sktometometo Aug 3, 2023
9ca0b7a
[spot_autowalk_data] update
sktometometo Aug 3, 2023
dd256a1
[jsk_spot_behaviors][jsk_spot_behavior_manager] update
sktometometo Aug 3, 2023
2bcf72c
[spot_basic_behaviors] update elevator_behaviors
sktometometo Aug 3, 2023
8680590
[jsk_spot_behaviors] fix bugs
sktometometo Aug 7, 2023
a7bb8c3
[spot_basic_behaviors] update elevator behaviors
sktometometo Aug 7, 2023
47cf829
[spot_basic_behaviors] update elevator behavior
sktometometo Aug 7, 2023
78e4dcb
[spot_basic_behaviors] udpate elevator behaviors
sktometometo Aug 12, 2023
dfb2767
[spot_ros_client] update default duration of trajectory
sktometometo Aug 12, 2023
2f17b60
[spot_basic_behaiviors] keep pressing while riding on a elevator
sktometometo Aug 16, 2023
3c888e0
[jsk_spot_startup] update launch
sktometometo Oct 16, 2023
dd5ea42
Add reset_current_node method
sktometometo Oct 18, 2023
7ee2f81
[spot_ros_client] add list_Node for jsk_spot_behavior_server
sktometometo Oct 21, 2023
0bb7f54
[jsk_spot_startup] add jsk_spot_behavior_maanger to package.xml
sktometometo Nov 22, 2023
dcdde66
[spot_ros_client] add velocity_limit to SpotRosCLient
sktometometo Oct 21, 2023
c7f7eb5
[spot_ros_client] update go_pos timeout time
sktometometo Oct 21, 2023
c0a5b4a
[jsk_spot_startup][spot_basic_behaviors] update dependency
sktometometo Oct 21, 2023
42f895f
[spot_basic_behaviors] set velocity_limit
sktometometo Oct 21, 2023
6f80bd4
[spot_basic_behaviors] set limit to rosparam
sktometometo Oct 22, 2023
f4719ff
[spot_basicZ_behaviors] add pu/down to switchbot device name ntry
sktometometo Nov 10, 2023
47ace0e
[spot_ros_client] add default limit to navigate_to
sktometometo Nov 10, 2023
e078090
[spot_basic_behaviors] add velocity limit to walk_behaviors
sktometometo Nov 10, 2023
4fe579c
[spot_basic_behaviors] update elevator behaviors
sktometometo Aug 7, 2023
da01860
[spot_basic_behaviors] update elevator detection launch
sktometometo Nov 22, 2023
e3c930e
[spot_basic_behaviors] update elevator detection launch
sktometometo Nov 22, 2023
f2c9b3a
[spot_ros_client] add print
sktometometo Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions jsk_spot_robot/jsk_spot_behavior_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 2.8.3)
project(jsk_spot_behavior_manager)

find_package(catkin REQUIRED)

catkin_python_setup()

catkin_package(
)
93 changes: 93 additions & 0 deletions jsk_spot_robot/jsk_spot_behavior_manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# jsk_spot_behaviors

These packages enable for Spot to execute locomotoion behaviors to reach a desired position.

## Concept

In this framework, knowledge about positions and transtion behaviors between them are represented as a digraph like below.

Each node represents specified positions and each edge represents a behavior to transition between them.

![example_graph](https://user-images.githubusercontent.com/9410362/124147589-cc8ce700-dac9-11eb-930f-1c00c2a4777e.png)

A graph is defined by a yaml file ( e.g. [node.yaml in spot_behavior_graph](./spot_behavior_graph/config/node.yaml) and [edge.yaml in spot_behavior_graph](./spot_behavior_graph/config/edge.yaml) )
Please see nodes and edges format section below.

Knowledge representation and execution process of behaviors are separated from actual behavior implementation.
The implementation of former is in spot_behavior_manager and spot_behavior_manager_server, but actual behaviors like walk and elevator are in spot_basic_behaviors.
behavior_manager_server node will dynamically load each behaviors defined in map.yaml so you can easilly add your behavior without editing these core implementation.
Please see spot_basic_behaviors package for behavior examples.

## How to use it

To run demo, please make Spot stand in front of the fiducial in 73B2 and run

```bash
roslaunch spot_behavior_graph demo.launch
```

```bash
$ rostopic pub -1 /spot_behavior_manager_server/lead_person/execute_behaviors spot_behavior_manager_msgs/LeadPersonActionGoal "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
goal_id:
stamp:
secs: 0
nsecs: 0
id: ''
goal:
target_node_id: 'eng2_2FElevator'"
```

Then Spot will go to 2FElevator of eng2 by walk behavior and elevator behavior implemented in spot_basic_behaviors packages.

https://user-images.githubusercontent.com/9410362/124338016-aad25380-dbe0-11eb-962f-b9a27e1e08cb.mp4

For more details, please see [spot_behavior_manager](./spot_behavior_manager), [spot_behavior_manager_server](./spot_behavior_manager_server) and each behavior documentation. (e.g. [spot_basic_behaviors](./spot_basic_behaviors) )

## Behavior Graph


This package provides graph and node data for spot_behavior_manager.

### scripts

#### visualize_map.py

Visualizer script of map file of spot_behavior_manager

Befor using this script, you need to install

```
pip3 install graphviz xdot
```

##### Usage

```
rosrun spot_behavior_graph visualize_map.py --filename <config map yaml>
```

##### Example Output

![map](https://user-images.githubusercontent.com/9410362/132942120-4a4e652b-3d25-43df-a678-fd3c09782284.png)

## behavior manager server

This package provides ros nodes for spot_behavior_manager.

### ROS Node

#### behavior_manager_server.py

ROS Node script for spot_behavior_manager.

See [the source of behavior_manager_node](../spot_behavior_manager/src/spot_behavior_manager/behavior_manager_node.py).

#### interactive_behavior_executor.py

ROS Node script to execute action of spot_behavior_manager by language.

Loading