UCSD-Quadcopter / SLAM-ROS-Node

Contains code for the SLAM Node Cluster
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Create System ROS Node #3

Open nickwn opened 5 years ago

nickwn commented 5 years ago

Purpose

As explained in the previous meeting, the System ros node will listen to sensor topics and compute (via kalman filters) the estimated robot position. It will then publish the calculated robot position to its own topic. In other words, Sensor nodes will publish their estimate of where they think the robot is and the system node will combine all the position estimates together to compute a combined estimate.

Since we will be using this class to compute the enemy drone's position as well as our own drone's position, we want this class to be easy to adapt to different inputs. Ideally, the node would be started with a command similar to the following: ./system --sensors <topics...> --output <topic>

The system should register itself as a subscriber to all ros topics specified and create a callback for each topic. Each callback will first change the kalman filter's transition matrix to the sensor's respective transition matrix call the correct() function on the Kalman Filter with the given data. In this way, we can think of the Kalman Filter as a kind of state machine (with the state changing for every sensor).

It will also have a main loop which loops through as fast as possible and steps through the state using the Kalman Filter's predict() function.

System inputs and output will be in the format [x, y, z, theta, phi, psi, dx/dt, dy/dt, dz/dt, dtheta/dt, dphi/dt, dpsi/dt]

Useful references:

nickwn commented 5 years ago

(copied from @ronakdev 's comments from #2 in moving everything over to new project) How to make a ros node: https://husarion.com/tutorials/ros-tutorials/2-creating-nodes/#publishing-to-topic

Using Docker to create a ros env: https://www.youtube.com/watch?v=9xqekKwzmV8 https://github.com/ruffsl/ros_docker_demos

nickwn commented 5 years ago

Referencing Commit 0d65cef, where I set up a basic pubsub model in docker;

Also uploaded my image to docker: https://cloud.docker.com/u/ucsdquadcopter/repository/docker/ucsdquadcopter/rosnodebase

nickwn commented 5 years ago

Starter code for node here: https://gist.github.com/nickwn/4a4368d2f3d9aec5338b06864de27b7f