xarm7_redundancy_res
Setting up ROS with virtualenv
We set up ROS with virtualenv because it is a better way to contain the python packages needed when running ROS.
Installing virtualenv
You can install virtualenv by opening a terminal and running:
Setting up the virtual environment
Make and navigate to a directory folder where you will keep your virtual environment folders, then run:
[Please note for the following steps we assume that you already have the xarm_ros repo cloned] Navigate to xarm_ros/examples/xarm7_redundancy_res, and run:
This will install the python dependencies needed for the robot_jogging.py script.
You can check that the requirements are installed properly by running:
Running Instructions
In the below steps we assume: (1) that you’ve set up a loadable virtual env and (2) that you’ve built the xarm_ros package using catkin_make
In a terminal, run:
In a second terminal, run
Using the Rviz move_it interface, move the xarm to a position you are happy with. Then, in a third terminal, run:
In the above command line, the -q option is the desired angle change, the -i option indicates the ith joint, and the -a option is the stepsize alpha.
Alternatively, robot_jogging.py can be run within a python shell, allowing you to make function calls from the shell to the jog and redundancy_resolution functions defined within robot_jogging.py. To do this alternative method, open the third terminal and run:
Creating the requirements.txt file for new packages
All required python libraries should be installed using pip while the virtual environment is activated.
With the virtual environment created and activated, run:
Open a new terminal without activating the ros and catkin setup.bash files. Only activate the virtual environment and then navigate to your project’s directory. Run:
The requirements.txt file should be created with all the python dependencies.
Last updated