CASPR-RViz is an RViz interface for visualizing cable-driven parallel robots (CDPRs) in CASPR.
- ROS
- Install ROS on your Linux platform (ROS Kinetic Installation)
- Make sure your ROS installation includes rviz (e.g. Desktop-Full Install)
- CASPR
- Install CASPR on MATLAB
- Robotics System Toolbox
- Install Robotics System Toolbox on MATLAB to use ROS on the MATLAB side
- Clone CASPR-RViz to your Linux platform
git clone https://github.com/darwinlau/CASPR-RViz.git
- Build CASPR-RViz
cd CASPR-RViz && catkin_make
- Configure ROS
- Connect the platforms that you installed CASPR-RViz and CASPR
- Note the IP of the platform that you built CASPR-RViz by
ifconfig - Edit the
~/.bashrcfile bygedit ~/.bashrc - Put the following lines in your
~/.bashrcfile and save it:
export ROS_IP=[caspr-rviz IP]
export ROS_MASTER_URI=http://$ROS_IP:11311
where [caspr-rviz IP] refers to the IP of your CASPR-RViz platform
- Add environment variables
source devel/setup.bash
- Launch RViz with:
roslaunch caspr_rviz caspr_rviz.launch
- Enable visualization of meshes and transformations
- Add
MarkerandTFby pressing theAddbutton of the RVizDisplaypanel
Save Configfor convenience
- Configure CASPR-RViz interface in CASPR
- Note the IP of the platform that you installed CASPR by
ifconfig(Linux) oripconfig(Windows) - Call the following function to set the config of CASPR-RViz interface in CASPR:
CASPRRViz_configuration.SetROSConfig('[caspr-rviz IP]','[caspr IP]');
where [caspr-rviz IP] refers to the IP of your CASPR-RViz platform, and [caspr IP] refers to the IP of your CASPR platform
- Launch CASPR-RViz
source devel/setup.bash
roslaunch caspr_rviz caspr_rviz.launch
- Launch CASPR GUI on CASPR (MATLAB)
CASPR_GUI
-
Select your desired model in the
Modeldrop down menu of CASPR GUI -
Press the
To RVizbutton on CASPR GUI -
Select
worldin theGlobal Options > Fixed Framedrop down menu on the RVizDisplaypanel -
Verify that the robot is successfully visualized in RViz
-
Select your desired model in the
Modeldrop down menu of CASPR GUI -
Press the
Kinematicsbutton inSimulators -
Press the
Runbutton in Kinematics Simulator to run a simulation -
After the simulation is finished, press the
RVizbutton to visualize the robot's motion
-
Select your desired model in the
Modeldrop down menu of CASPR GUI -
Press the
Dynamicsbutton inSimulators -
Press the
Runbutton in Dynamics Simulator to run a simulation -
After the simulation is finished, press the
RVizbutton to visualize the robot's motion and force vectors
- Change the thickness of the cables by:
rosparam set /cable_scale scale
- Change the color (RGBA) of the cables by:
rosparam set /cable_color [R,G,B,A]
- Change the color (RGBA) of the links by:
rosparam set /link_color [R,G,B,A]
- Change the magnitude of the force arrows by:
rosparam set /force_scale scale
- Change the shape of the force arrows by:
rosparam set /force_arrow_scale [x,y,z]