Tank launch project packages:
- ros_tank_logic
- ros_tank_gazebo
- ros_tank_navigation
- ros_tank_description
Then change value param for tank launcher:
Commands for starting the project:
-
download file - arduino/ros_tank.ino to arduino
-
Connect via ssh to jetson ssh name@192.168.0.140 exec following commands: cd ros_tank ./run_jetson.bash ros2 launch ros_tank_control ros_tank_control_diff.launch.py
Command to check: available cameras: ls /dev | grep video* available lidar: ls -l /dev |grep ttyUSB
lsusb - get list USB devices sudo chmod 666 /dev/ttyUSB0 or /dev/ttyACM0
-
In PC terminal ./run.bash ros2 launch ros_tank_logic ros_tank_rviz.launch.py
-
Another PC terminal ./exec.bash ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=/diff_drive_controller/cmd_vel_unstamped
For simulation:
. /usr/share/gazebo/setup.sh
ros2 launch ros_tank_logic ros_tank_sim.launch.xml
- ros2 launch ros_tank_gazebo start_world.launch.py
- ros2 launch ros_tank_logic ros_tank_rviz_sim.launch.py
- ros2 launch ros_tank_gazebo spawn_robot.launch.py
ros2 run teleop_twist_keyboard teleop_twist_keyboard
run joint state publisher node: ros2 run joint_state_publisher_gui joint_state_publisher_gui
run lidar node: ros2 launch rplidar_ros view_rplidar.launch.py ros2 launch rplidar_ros rplidar.launch.py
ros2 launch ros_tank_navigation rplidar.launch.py ros2 launch ros_tank_navigation camera.launch.py
ros2 launch ros_tank_control ros_tank.xml
checking camera: sudo apt-get install v4l-utils v4l2-ctl --list-devices
run camera node: ros2 run usb_cam usb_cam_node_exe --ros-args --params-file /ros2_ws/src/ros_tank_description/config/camera-params.yaml
ros2 topic pub --once /forward_position_controller/commands std_msgs/msg/Float64MultiArray " layout: dim: [] data_offset: 0 data:
- 1
- 1"