Fix most common issues:
=======================
For frame [velodyne]: Frame [velodyne] does not exist
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 map my_frame 10
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 velodyne 10
// launch a service
roslaunch [package name] mtig_driver.launch
// runs a node
rosrun [package name] [node name]
// finds a package
rospack find [package name]
rosstack find [package name]
// Installs dependencies
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
// Lists topics
rostopic list
// Echo the message
rostopic echo [topic name]
// Build
catkin_make
// Remember to resource the devel/setup.bash in your workspace
// Visualization
rosrun rviz rviz
rosrun rviz rviz -f velodyne
// Dump data
rosbag record -o output.bag [topic]
Common ROS Commands
Package
catkin_create_pkg: create a new package
rospack: get info about the package in the file system
catkin_make: build the packages in your workspace
rosdep: install the system dependencies required for a package
Messages
rosmsg show
rosmsg list
rosmsg md5 : display md5sum of a message
rosmsg package : lists messages in a package
Service
Action
Nodes
rosnode info
rosnode kill
rosnode list
rosnode machine
rosnode ping
rosnode cleanup
Topics
rostopic bw
: display the bandwidth used by the given topicrostopic echo
: print the content of the given topicrostopic find
: find topics using the given message typerostopic hz
: display the publishing rate of the given topicrostopic list: list all active topics in the ROS system
rostopic pub
: to publish a value to a topic with a message typerostopic type
: display the message type of the given topicServices
rosservice call
: call the service using the given argumentsrosservice find : find services in the given service type
rosservice info
: print info about the given servicerosservice type
: print the service type of a given servicerosservice uri
: print the service ROSRPC URIBags
rosbag record -O -a: record all topics to a bag file
rosbag record -O [topic_1] [topic_2] …: record some topics to a bag file
rosbag play : playback an existing bag file
Parameter server
Fill in later
Useful Procedures
Create your ROS workspace (THIS IS IMPORTANT)
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace: initialize a catkin workspace
cd ~/catkin_ws
catkin_make: build the empty workspace
After building the empty space, set the environment variables: echo “source ~/catkin_ws/devel/setup.bash” >> ~/.bashrc
source ~/.bashrc
Create your own package
Switch to workspace src folder: cd ~/catkin_ws/src
Create the package: catkin_create_pkg [dependency 1] [dependency 2]
Example: catkin_create_pkg demo_pkg roscpp std_msgs actionlib actionlib_msgs
After creating the package, build the empty package using: ~/catkin_ws$ catkin_make
Start ROS
Run: $roscore
Useful Drivers
Pointgrey camera driver
Installation
Velodyne driver
Installation
cd catkin_ws/src
git clone https://github.com/ros-drivers/velodyne
Follow the steps in the following link to build VLP16 from source:
http://answers.ros.org/question/226594/how-do-i-build-ros-vlp16-velodyne-driver-for-indigo-using-catkin/
Invoke
roslaunch velodyne_pointcloud VLP16_points.launch
Visualize
rosrun rviz rviz
Bottom left corner: “Add” -> PointCloud2
Change: PointCloud2 -> Topic to: /velodyne_points
Important: Change Global Options -> Fixed Frame to: /velodyne
IP Setup for Sensors
In ubuntu, Edit connections -> Edit -> IPv4 settings
Change method to manual
Setting the address like the following
Pointgrey A (16049350) Red
Address: 192.168.100.1
Netmask: 255.255.255.0
Pointgrey B (16049342): Green
Address: 192.168.101.1
Netmask: 255.255.255.0
Velodyne:
Address: 192.168.200.77
Netmask: 255.255.255.0
No comments:
Post a Comment