Pass an argument inside a shell script file
HI,
I want to execute .sh file and pass an arguments inside this file. For example: I have this script:
#!/bin/bash
source /opt/ros/kinetic/setup.bash
source ~/catkin_ws/devel/setup.bash
roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=192.168.1.100
I can execute from terminal by runnign ./script_name.sh but It is not taking care the argument robot_ip
How can I pass this arguments inside the shell script?
Thanks, Aviad
Please share your output. What do you mean by it is not taking care of robot_ip
I want to launch some launch file with an argumnent
rviz
for example. If I run in terminalroslaunch pkg file.launch rviz:=true
I want rviz to open. Inside the terminal it is working of course but If it is wrote inside a .sh file the argrviz
is not pass like in the terminal.Please also note:
this package has been deprecated, as mentioned in the readme. See also Deprecation of ur_modern_driver on ROS Discourse.
If you have a CB3 controller with your UR robot, you should not be using
ur_modern_driver
any more.