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

Add mission planner for deployment #11

Draft
wants to merge 48 commits into
base: deployment
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8ad7e3d
init changes
shivamtrip Sep 22, 2023
4c38795
test
shivamtrip Sep 22, 2023
83998af
minor update
shivamtrip Sep 27, 2023
2af3e5b
ogm updates (10/02)
shivamtrip Oct 3, 2023
51d5f22
3d obstacle avoidance sort of working
shivamtrip Oct 3, 2023
441fe5d
changes
shivamtrip Oct 5, 2023
2032ce9
updated costmap parameters, svtl visual works
shivamtrip Oct 6, 2023
98be1cf
added button-interface scripts
shivamtrip Oct 13, 2023
619457b
NavMan skeleton code working
shivamtrip Oct 19, 2023
e3ae43b
movebase node now runs in different terminal
shivamtrip Oct 19, 2023
eb27bb5
improved moveback recovery
shivamtrip Oct 20, 2023
11ce903
basic param changes
shivamtrip Oct 20, 2023
dffbd32
10-27
shivamtrip Oct 28, 2023
1b8791f
eta
shivamtrip Oct 29, 2023
ddc1388
firebaseupdate_eta
shivamtrip Oct 29, 2023
374eded
navman_working
shivamtrip Oct 31, 2023
65fc3b6
visual_servoing integration w deployment task planner
shivamtrip Nov 1, 2023
bbeb4bb
also battery updation on firebase
shivamtrip Nov 1, 2023
529d8b2
some more
shivamtrip Nov 1, 2023
d68d033
mission_planner initial
shivamtrip Nov 3, 2023
508452f
Merge branch 'navigation-manager' into mission_planner
shivamtrip Nov 3, 2023
7f23ec4
Add navgate to local
shivamtrip Nov 3, 2023
a647aef
interface_manager reads firebase, sends task to mp
shivamtrip Nov 7, 2023
8284334
task_executor basic implementation
shivamtrip Nov 8, 2023
44d736f
mission_planner integrated with navigation basic
shivamtrip Nov 9, 2023
c47532b
added state_manager and map_locations files
shivamtrip Nov 10, 2023
de127d4
navigating to two locations working
shivamtrip Nov 10, 2023
8ddfb22
mp + state_manager + cloud, not working yet
shivamtrip Nov 10, 2023
b2a681a
interface manager status update working
shivamtrip Nov 11, 2023
794defc
execute task function working with manip and nav
shivamtrip Nov 12, 2023
0b2c2f4
added aruco manip folder
shivamtrip Nov 16, 2023
cf7e01a
aruco_manip pick working robust
shivamtrip Nov 16, 2023
a3728cb
aruco manipulation stack cleanup done
shivamtrip Nov 17, 2023
d611222
manipulation manager integrated with mp
shivamtrip Nov 18, 2023
f58f2b3
3d nav + manip worked once but aruco not detected during horizontal a…
shivamtrip Nov 18, 2023
0f90a20
fixes to json, 3d + aruco detection
shivamtrip Nov 18, 2023
1b3e7f3
working 2d pick & place
shivamtrip Nov 18, 2023
f80d4af
3d nav + aruco det working
shivamtrip Nov 19, 2023
62f2c55
changed manipulation offsets
shivamtrip Nov 20, 2023
fc9e292
integrated telepresence manager, not fully working
shivamtrip Nov 25, 2023
61965d3
added pcd_pub for 3D navigation low res pcd
shivamtrip Nov 25, 2023
955378a
created single bash script to launch all nodes
shivamtrip Nov 25, 2023
f62e1b6
stopping yolo detections when not in telepresence
shivamtrip Nov 26, 2023
0400783
telepresence visual servoing working
shivamtrip Nov 27, 2023
fb5da52
videocall integrated with mp
shivamtrip Nov 27, 2023
082a8ec
fixed navigation oscillation issue
shivamtrip Nov 28, 2023
fc57aa0
vincentian delivery to room almost works
shivamtrip Nov 28, 2023
48531b1
vincentian delivery + videocall working
shivamtrip Nov 29, 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
2 changes: 1 addition & 1 deletion install_scripts/setup_brain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ cd ~/ws/
source /opt/ros/noetic/setup.bash

catkin build
source ./devel/setup.bash
source ./devel/setup.bash
3 changes: 3 additions & 0 deletions launch_scripts/.tmux-conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set -g mouse on

set-option -g default-shell /bin/bash
2 changes: 1 addition & 1 deletion launch_scripts/launch_brain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
nvidia-smi | grep 'python' | awk '{ print $5 }' | sudo xargs -n1 kill -9
sleep 3
source /home/praveen/ws1/devel/setup.bash
export ROS_MASTER_URI=http://stretch-re1-1056:11311/
export ROS_MASTER_URI=http://stretch-re1-1061:11311/
roslaunch alfred_core perception_brain.launch
37 changes: 20 additions & 17 deletions launch_scripts/launch_robot.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# echo "set-option -g pane-border-status top" >> ~/.tmux.conf
# echo "set -g pane-border-format '[#[fg=white]#{?pane_active,#[bold],} #P #T #[fg=default,nobold]]'" >> ~/.tmux.conf

SESSION_NAME="Alfred Autonomy Stack!"
SESSION_NAME="Alfred Deployment Stack!"

if tmux has-session -t "$SESSION_NAME" >/dev/null 2>&1; then
# If session exists, attach to it
Expand All @@ -17,32 +17,35 @@ else
# Launch tmux session
rosnode kill --all
tmux new-session -d -s autonomy
tmux source-file ~/ws/launch_scripts/.tmux-conf

#split window into 3x3 grid
tmux split-window -v
tmux split-window -v
tmux split-window -v
tmux select-pane -t 0
tmux split-window -h
tmux split-window -v # splits into two windows vertically (top-bottom)
tmux split-window -v # splits into three windows vertically
# tmux split-window -v
tmux select-pane -t 0 # selects pane 0
tmux split-window -h # splits that into two windows horizontally (left-right)
tmux select-pane -t 2
tmux split-window -h
tmux select-pane -t 4
tmux split-window -h
tmux select-pane -t 6
tmux split-window -h
# tmux select-pane -t 6



# To kill session --> type "Ctrl + B, then Shift + :, then type kill-session"
# Run commands in each pane (add sleeps to wait for roscore to start)
# tmux send-keys -t 0 "roscore" C-m
tmux send-keys -t 0 "sleep 1 && roslaunch alfred_core driver.launch " C-m
tmux send-keys -t 1 "sleep 10 && roslaunch alfred_core perception_robot_tuned.launch" C-m
tmux send-keys -t 2 "sleep 20 && roslaunch alfred_navigation navigation_no_driver.launch" C-m
tmux send-keys -t 3 "sleep 23 && rosrun task_planner task_planner.py" C-m
tmux send-keys -t 4 "sleep 25 && roslaunch manipulation robot_manipulation.launch" C-m
tmux send-keys -t 5 "sleep 26 && roslaunch alfred_hri hri.launch" C-m
tmux send-keys -t 6 "sleep 23 && ssh praveen@alfredbrain 'bash -s < /home/praveen/ws1/launch_scripts/launch_brain.sh'" C-m
tmux send-keys -t 7 "htop" C-m
# tmux send-keys -t 6 "sleep 1 && roslaunch alfred_core driver.launch" C-m
# tmux send-keys -t 7 "sleep 1 && roslaunch alfred_core perception_robot_tuned.launch" C-m

tmux send-keys -t 0 "sleep 2 && roslaunch interface_manager interface_manager.launch " C-m
tmux send-keys -t 1 "sleep 4 && roslaunch mission_planner mission_planner.launch" C-m
tmux send-keys -t 2 "sleep 6 && roslaunch alfred_navigation navigation.launch" C-m
tmux send-keys -t 3 "sleep 18 && roslaunch manipulation robot_manipulation.launch" C-m
tmux send-keys -t 4 "sleep 21 && roslaunch telepresence telepresence_manager.launch" C-m
tmux send-keys -t 5 "htop" C-m

# tmux send-keys -t 1 "sleep 10 && roslaunch alfred_core perception_robot_tuned.launch" C-m

# Attach to tmux session
tmux attach-session -t autonomy
Expand Down
49 changes: 49 additions & 0 deletions launch_scripts/old_launch_robot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# Automated running all hardware nodes
# use bash command to make a file ~/.tmux.conf and add lines to print pane name
# if [ ! -f ~/.tmux.conf ]; then
# add lines to tmux config to print pane name
# touch ~/.tmux.conf
# echo "set-option -g pane-border-status top" >> ~/.tmux.conf
# echo "set -g pane-border-format '[#[fg=white]#{?pane_active,#[bold],} #P #T #[fg=default,nobold]]'" >> ~/.tmux.conf

SESSION_NAME="Alfred Autonomy Stack!"

if tmux has-session -t "$SESSION_NAME" >/dev/null 2>&1; then
# If session exists, attach to it
tmux attach-session -t "$SESSION_NAME"
else
# Launch tmux session
rosnode kill --all
tmux new-session -d -s autonomy

#split window into 3x3 grid
tmux split-window -v
tmux split-window -v
tmux split-window -v
tmux select-pane -t 0
tmux split-window -h
tmux select-pane -t 2
tmux split-window -h
tmux select-pane -t 4
tmux split-window -h
tmux select-pane -t 6
tmux split-window -h



# Run commands in each pane (add sleeps to wait for roscore to start)
# tmux send-keys -t 0 "roscore" C-m
tmux send-keys -t 0 "sleep 1 && roslaunch alfred_core driver.launch " C-m
tmux send-keys -t 1 "sleep 10 && roslaunch alfred_core perception_robot_tuned.launch" C-m
tmux send-keys -t 2 "sleep 20 && roslaunch alfred_navigation navigation_no_driver.launch" C-m
tmux send-keys -t 3 "sleep 23 && rosrun task_planner task_planner.py" C-m
tmux send-keys -t 4 "sleep 25 && roslaunch manipulation robot_manipulation.launch" C-m
tmux send-keys -t 5 "sleep 26 && roslaunch alfred_hri hri.launch" C-m
tmux send-keys -t 6 "sleep 23 && ssh praveen@alfredbrain 'bash -s < /home/praveen/ws1/launch_scripts/launch_brain.sh'" C-m
tmux send-keys -t 7 "htop" C-m

# Attach to tmux session
tmux attach-session -t autonomy
fi
83 changes: 83 additions & 0 deletions src/common/alfred_core/launch/deployment_perception.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<launch>

<!-- <arg name="rs_initial_preset" default="$(find alfred_core)/config/camera_configs/HighAccuracyPreset.json" doc="filepath to json defining a visual preset for the depth image" /> -->
<!-- <arg name="rs_initial_preset" default="$(find alfred_core)/config/camera_configs/DefaultPreset1.json" doc="filepath to json defining a visual preset for the depth image" /> -->
<!-- <arg name="rs_initial_preset" default="$(find alfred_core)/config/camera_configs/DefaultPreset2.json" doc="filepath to json defining a visual preset for the depth image" /> -->
<!-- <arg name="rs_initial_preset" default="$(find alfred_core)/config/camera_configs/HighDensityPreset.json" doc="filepath to json defining a visual preset for the depth image" /> -->
<!-- <arg name="rs_initial_preset" default="$(find alfred_core)/config/camera_configs/MidDensityPreset.json" doc="filepath to json defining a visual preset for the depth image" /> -->
<!-- <arg name="rs_initial_reset" default="true" doc="whether to reset camera before streaming, useful if the camera got into a bad state in the last session" /> -->

<!-- REDUCE RATE AND USE NUC TIME -->
<!-- <node name="d435i_accel_correction" pkg="stretch_core" type="d435i_accel_correction" output="screen" /> -->
<include file="$(find image_shrink)/launch/image_shrinker.launch" />


<!-- REALSENSE D435i -->
<include file="$(find realsense2_camera)/launch/rs_rgbd.launch">
<arg name="infra_width" value="848"/>
<arg name="infra_height" value="480"/>
<arg name="depth_width" value="848"/>
<arg name="depth_height" value="480"/>
<arg name="color_width" value="1280"/>
<arg name="color_height" value="720"/>
<!-- "The D435i depth camera generates and transmits the gyro and
accelerometer samples independently, as the inertial sensors
exhibit different FPS rates (200/400Hz for gyro, 63/250Hz for
accelerometer)."
https://realsense.intel.com/how-to-getting-imu-data-from-d435i-and-t265/
https://github.com/intel-ros/realsense
-->
<arg name="accel_fps" value="100"/>
<arg name="gyro_fps" value="200"/>

<arg name="enable_infra1" value="true"/>
<arg name="enable_infra2" value="true"/>
<arg name="enable_accel" value="true"/>
<arg name="enable_color" value="true"/>
<arg name="enable_depth" value="true"/>



<arg name="color_fps" value="15"/>
<arg name="depth_fps" value="15"/>
<arg name="infra_fps" value="15"/>

<!-- publish depth streams aligned to other streams -->
<arg name="align_depth" value="true"/>

<!-- publish an RGBD point cloud -->

<!-- "tf_prefix: By default all frame's ids have the same prefix -
camera_. This allows changing it per camera."
https://github.com/intel-ros/realsense -->

<!-- "enable_sync: gathers closest frames of different sensors,
infra red, color and depth, to be sent with the same
timetag. This happens automatically when such filters as
pointcloud are enabled."
https://github.com/intel-ros/realsense -->
<arg name="enable_sync" value="true"/>
<arg name="filters" value="spatial,pointcloud"/>


<!-- "You can have a full depth to pointcloud, coloring the
regions beyond the texture with zeros..." -->
<!-- Set to true in order to make use of the full field of view of
the depth image instead of being restricted to the field of
view associated with the narrower RGB camera. Note that
points out of the RGB camera's field of view will have their
colors set to 0,0,0. -->
<!-- <arg name="allow_no_texture_points" value="false"/> -->

<!-- "initial_reset: On occasions the device was not closed
properly and due to firmware issues needs to reset. If set to
true, the device will reset prior to usage."
https://github.com/intel-ros/realsense -->
<!-- <arg name="initial_reset" value="$(arg rs_initial_reset)"/> -->

<!--<arg name="unite_imu_method" value="copy"/> linear_interpolation-->

<!-- <arg name="json_file_path" value="$(arg rs_initial_preset)" /> -->
</include>

</launch>
2 changes: 1 addition & 1 deletion src/common/alfred_core/launch/driver.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<param name="/alfred_driver/mode" type="string" value="navigation" />
<param name="robot_description" textfile="$(find alfred_core)/config/stretch.urdf" />
<arg name="calibrated_controller_yaml_file" value="$(find alfred_core)/config/controller_calibration_head.yaml"/>

<node
name="joint_state_publisher"
pkg="joint_state_publisher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<!-- REDUCE RATE AND USE NUC TIME -->
<!-- <node name="d435i_accel_correction" pkg="stretch_core" type="d435i_accel_correction" output="screen" /> -->
<include file="$(find pcd_pub)/launch/low_res_pcd_pub.launch" />
<include file="$(find image_shrink)/launch/image_shrinker.launch" />


Expand Down Expand Up @@ -58,8 +59,7 @@
https://github.com/intel-ros/realsense -->
<arg name="enable_sync" value="true"/>
<arg name="filters" value="spatial,pointcloud"/>


<!-- <arg name="enable_pointcloud" default="true"/> -->
<!-- "You can have a full depth to pointcloud, coloring the
regions beyond the texture with zeros..." -->
<!-- Set to true in order to make use of the full field of view of
Expand Down
Loading