command reference

to change between booting to command prompt or desktop

​sudo systemctl get-default
sudo systemctl set-default multi-user.target
sudo systemctl set-default graphical.target

startx

to install the usb-cam driver for ros

sudo apt-get install ros-kinetic-usb-cam
rosrun usb_cam usb_cam_node

to run rviz, ydlidar

rosrun ydlidar ydlidar_client
roslaunch ydlidar lidar_view.launch
roslaunch ydlidar rviz.launch
roslaunch ydlidar lidar.launch
nohup rosrun usb_cam usb_cam_node &
roslaunch analyze_scan analyze.launch
rosrun rviz rviz -d /home/ubuntu/catkin_ws/src/ydlidar/launch/lidar.rviz

ros stuff

rosparam set /ydlidar_node/frequency 1

nohup rosbag record /usb_cam/image_raw/compressed /scan --split --duration=5m --lz4 &
rosbag play 2018-10-24-20-06-32.bag
rosbag reindex 2018-10-25-20-14-59.bag.active

rostopic list
rostopic echo battery_state
rostopic echo /scan -n1
rostopic info pose
rostopic pub /pose geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "world"}, pose: {position: {x: 0, y: 0, z: 1}, orientation: {w: 1.0}}}'

rosrun rosserial_python serial_node.py /dev/ttyACM0

to copy all files from pi to my machine (and into my vm on the way)

rsync -avz ubuntu@rover.local:catkin_ws/src/ana* /users/d039026/dropbox/rover

network and system stuff

sudo shutdown
ssh ubuntu@rover.local
ifconfig
sudo service network-manager restart
sudo pifi set-hostname rover
ps -aux

to make a new project

catkin_create_pkg analyze_scan
cd analyze_scan/
catkin_make analyze_scan