Skip to content

XiyuZhai97/Multi-Tracking-Cam-ROS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ROS pkg actionflow for DC demo

Set up Environment

git and cmake should be installed

sudo apt-get install git cmake

Create Catkin Workspace

Create a ROS Catkin workspace to contain our ROS packages:

  mkdir -p ./workspace/catkin_ws/src
  cd ./workspace/catkin_ws
  catkin_make
  # add catkin_ws path to bashrc
  sudo sh -c 'echo "source ~/workspace/catkin_ws/devel/setup.bash" >> ~/.bashrc'

Verify:

  echo $ROS_PACKAGE_PATH

Install ros-serial

  sudo apt-get install ros-melodic-rosserial-server

Make package

clone this repo and make this package copy actionflow to ~/workspace/catkin_ws/src catkin_make

  cp -r ./actionflow ~/workspace/catkin_ws/src
  cd ~/workspace/catkin_ws
  catkin_make

Set up network

sudo gedit .bashrc

add

export ROS_MASTER_URI=http://ROScore:11311
export ROS_IP=thisdeviceIP
export ROS_HOSTNAME=thisdevice

Running the Demo

Start roscore and rosserial

  roscore
  roslaunch rosserial_server socket.launch

Realtime cars following

Connect to camera,

rosrun local file (local NumberofCars IndexofCamera RefreshRate)

Click four corner and press ESC after each click

  rosrun actionflow local 17 0 30

Seeing Results

  rqt_image_view

to see the realtime video

  rosrun actionflow dc_demo_realtime.py

Control the Autonomous Car

Confirm it is connected to ROSCORE by seeing if there is Car_19 in rostopic

  rostopic list

Use Listener to sub what Car_19 heard

  rosrun actionflow listener Car_19

Running the Control script

  rosrun actionflow mbot_testcontrol_key.py

press 0 to 5 to control the speed of the Autonomous Car

About

ROS package for image tracking and robot control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published