Lars-33 / masteruia

0 stars 0 forks source link

husky leader and tb follower #10

Closed Lars-33 closed 1 year ago

Lars-33 commented 1 year ago

suggested solutions : rosbag , Traveling in time (C++) Recording and playing back data

Edit : plan is to use rosbag to record path of husky (/plan), i will test this with turtlebot nav2 simulation (https://navigation.ros.org/getting_started/index.html)

Lars-33 commented 1 year ago

path

Lars-33 commented 1 year ago

i wasent able to make telop into a launch file idk why, so here is the setup:

source /opt/ros/foxy/setup.bash export TURTLEBOT3_MODEL=waffle ros2 run turtlebot3_teleop teleop_keyboard --ros-args --remap /cmd_vel:=/tb/cmd_vel

tb_cmd_vel

Lars-33 commented 1 year ago

source /opt/ros/foxy/setup.bash export TURTLEBOT3_MODEL=waffle export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/foxy/share/turtlebot3_gazebo/models

ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False

Lars-33 commented 1 year ago

rosbag /path : https://youtu.be/_HDzjkgDcpk

rqt of nav turtlebot example :

rqt_nav_example

Lars-33 commented 1 year ago

source /opt/ros/foxy/setup.bash

ros2 launch nav2_bringup localization_launch.py map:=/home/lars/MasterUiA/tb_ws/map/Masterlabben.yaml

source /opt/ros/foxy/setup.bash

ros2 launch nav2_bringup rviz_launch.py

Lars-33 commented 1 year ago

ssh tb@192.168.0.176

cd MasterUiA/tb_ws/ source /opt/ros/foxy/setup.bash . install/setup.bash ros2 launch tb3_cpp tb3_launch.py

source /opt/ros/foxy/setup.bash ros2 launch slam_toolbox lifelong_launch.py

source /opt/ros/foxy/setup.bash export TURTLEBOT3_MODEL=waffle ros2 launch nav2_bringup navigation_launch.py

cd MasterUiA/tb_ws/ source /opt/ros/foxy/setup.bash . install/setup.bash ros2 launch tb3_cpp rviz_launch.py

Lars-33 commented 1 year ago

switch to galactic because ViperX 300 Robot Arm was attached to the husky and we want the entire system on the same ros distro

Lars-33 commented 1 year ago

source /opt/ros/galactic/setup.bash export TURTLEBOT3_MODEL=waffle ros2 run turtlebot3_teleop teleop_keyboard

launch file form foxy work on galactic

ssh tb@192.168.0.176

cd masteruia/tb_ws/ source /opt/ros/galactic/setup.bash . install/setup.bash ros2 launch tb3_cpp tb3_launch.py

source /opt/ros/galactic/setup.bash ros2 launch slam_toolbox lifelong_launch.py

source /opt/ros/galactic/setup.bash export TURTLEBOT3_MODEL=waffle ros2 launch nav2_bringup navigation_launch.py

cd masteruia/tb_ws/ source /opt/ros/galactic/setup.bash . install/setup.bash ros2 launch tb3_cpp rviz_launch.py

Lars-33 commented 1 year ago

struggling with slam exit code -11

nav2 localisation dosent work and nav2 navigation with slam life long dosent work

slamerror

/opt/ros/galactic/share/slam_toolbox/config/mapper_params_lifelong.yaml

ros2 launch slam_toolbox lifelong_launch.py params_file:=/home/tb/masteruia/tb_ws/src/tb3_cpp/params/mapper_params_lifelong.yaml

ros2 launch nav2_bringup localization_launch.py map:=/home/tb/masteruia/tb_ws/map/Masterlabben.yaml

solution

start up : turtlebort , slam lifelong , nav2 navigation , nav2 rviz

go into nav2 rviz under navigation2 panel click pause

then drive the tb ouround with telop key to make to map bigger ( look at rviz while driving )

then go back to where you paused nav2 quit telop and start nav2.

Lars-33 commented 1 year ago

closing this since its to general also i realised i need to learn Nav2 api https://navigation.ros.org/commander_api/index.html