Hello,
I have an automatically created configuration file that is a result from a world generation plugin in gazebo in which I define a few parameters that depend on my randomly generated world. This file is currently an xml, but i also tried a yaml and I could change to any other simple format (i'm currently creating it in the gazebo plugin).
So this is the first file :
and then I have a main launch file which include the following lines :
But it seems that when I call "include file", it only transmit args from the parent to the child (if there are some that are explicitely given as arguments) and that it is impossible to access the child arguments into the parent : when I call a roslaunch on my main file, it return "spawnX doesn't exist".
As gvdhoorn highlighted, "params" works differently, but i canno't use params here since spawn_model from gazebo_ros needs command line arguments intead of rosparams. Or as I said in my initial post : "I believe that Another possibility would be to define x y z as rosparam(=param) instead of plain command line arguments in spawn_model but since i'm using a node from the core of ros kinetic, I feel like this would have been done if it was possible on this precise case."
So in order to transmit ma data as an argument, I know that I can inverse the parent/child relationship between the 2 launch files (and explicitely detail the arguments I want to share between the 2 launch files). This would work but this wouldn't make sense since the child is only giving a few (non critical) parameters to my main launch.
Another possibility seems to use environment variables but this isnt possible here considering that, for an environement variable, to be readable by a roslaunch, it needs to be set before the launch is called (AFAIK).
I could create a configuration file with only a variable par line and a bash script should do the work calling the args in command line but it's not practical to call a bash instead of directly calling a launch file, and it wouldn't be clear at all for maintainers or simply readability for new users.
I saw [this](https://answers.ros.org/question/222096/get-roslaunch-arg-value-from-a-file/) old subject which seems to imply that it is impossible to load an argument, whether the parameter comes from a child launch file or any other type of files (and that I should either use env variable or rosparam which are both impossible in my case). But since it's an old post, I was still wondering if there now exist a simple way to include parameters from a file.
Edit : Considering the existence of rosparams which are already global, it seems very unlikely that anything has been done to change this fact which has only vey few use cases.
Thanks a lot for anyone who can help =D
TTDM
Edit: rephrased to clearly differentiate param and args
↧
roslaunch define args in parent launch from file or child launch
↧
How to configure a roslaunch xml to run a node that specifies a path?
I'm trying to run
rosrun ORB_SLAM2 RGBD PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE
within a .launch file and I don't know how to specify the path
I tried something like the following but it didn't run.
My example:
The error I get
Invalid roslaunch XML syntax: mismatched tag: line 6, column 2
↧
↧
rosnode kill in launch file
Hey there,
I would like to kill a specific rosnode by its name through calling a launch file
Anyone knows how this is possible?
Best,
Markus
↧
Controller manager - How to correctly launch it
Hi all,
I am building the robot described in question [#292882](https://answers.ros.org/question/292882/how-to-control-maxon-mcd-epos-with-ros_canopen-and-ixxat-adapter/) and trying to control the Maxon MCD Epos with [ROS Canopen](http://wiki.ros.org/ros_canopen).
I am running ROS Kinectic on a i7 desktop PC.
But now, I have a problem launching the controller_manager.
If I launch it, as is explain in the [wiki](http://wiki.ros.org/controller_manager)
I have the next error:
[INFO] [1528197681.380398]: Controller Spawner: Waiting for service controller_manager/load_controller
[WARN] [1528197711.592166]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[controller_node-3] process has finished cleanly
But, if I **change** the launch **type** and **args**, I have no error:
But I have no controllers loaded in my ROS. If I list the services, there isn't any for the controller_manager:
jorge@jorge-ubuntu:~$ rosservice list
/canopen_chain/get_loggers
/canopen_chain/set_logger_level
/driver/get_object
/driver/halt
/driver/init
/driver/recover
/driver/set_object
/driver/shutdown
/joint_state_publisher/get_loggers
/joint_state_publisher/set_logger_level
/robot_state_publisher/get_loggers
/robot_state_publisher/set_logger_level
/rosout/get_loggers
/rosout/set_logger_level
/rviz/get_loggers
/rviz/reload_shaders
/rviz/set_logger_level
Also, if I run:
jorge@jorge-ubuntu:~$ rosrun controller_manager controller_manager spawn pata1_velocity_controller
The terminal doesn't show any message.
If somebody need, I can upload the xacro file of the robot, the yaml for the controllers and the launch file.
Many thanks,
Jorge
**EDIT**:
I load all the parameters for the motors with
This is the yaml file:
hexapodo:
# Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
# Velocity Controllers ---------------------------------------
pata1_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: motor_1_to_base_link_joint
pid: {p: 3.0, i: 0.0, d: 0.0}
required_drive_mode: 3
pata2_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: motor_2_to_base_link_joint
pid: {p: 3.0, i: 0.0, d: 0.0}
required_drive_mode: 3
pata3_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: motor_3_to_base_link_joint
pid: {p: 3.0, i: 0.0, d: 0.0}
required_drive_mode: 3
pata4_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: motor_4_to_base_link_joint
pid: {p: 3.0, i: 0.0, d: 0.0}
required_drive_mode: 3
pata5_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: motor_5_to_base_link_joint
pid: {p: 3.0, i: 0.0, d: 0.0}
required_drive_mode: 3
pata6_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: motor_6_to_base_link_joint
pid: {p: 3.0, i: 0.0, d: 0.0}
required_drive_mode: 3
So, with this in the launch:
When I launch it, this is what I have with **rostopic list**:
jorge@jorge-ubuntu:~$ rostopic list
/joint_states
/rosout
/rosout_agg
/tf
/tf_static
With **rosnode list**:
/joint_state_publisher
/robot_state_publisher
/rosout
With **rosservice list**:
/joint_state_publisher/get_loggers
/joint_state_publisher/set_logger_level
/robot_state_publisher/get_loggers
/robot_state_publisher/set_logger_level
/rosout/get_loggers
/rosout/set_logger_level
And with **rosparam list**:
jorge@jorge-ubuntu:~$ rosparam list
/hexapodo/joint_state_controller/publish_rate
/hexapodo/joint_state_controller/type
/hexapodo/pata1_velocity_controller/joint
/hexapodo/pata1_velocity_controller/pid/d
/hexapodo/pata1_velocity_controller/pid/i
/hexapodo/pata1_velocity_controller/pid/p
/hexapodo/pata1_velocity_controller/required_drive_mode
/hexapodo/pata1_velocity_controller/type
/hexapodo/pata2_velocity_controller/joint
/hexapodo/pata2_velocity_controller/pid/d
/hexapodo/pata2_velocity_controller/pid/i
/hexapodo/pata2_velocity_controller/pid/p
/hexapodo/pata2_velocity_controller/required_drive_mode
/hexapodo/pata2_velocity_controller/type
/hexapodo/pata3_velocity_controller/joint
/hexapodo/pata3_velocity_controller/pid/d
/hexapodo/pata3_velocity_controller/pid/i
/hexapodo/pata3_velocity_controller/pid/p
/hexapodo/pata3_velocity_controller/required_drive_mode
/hexapodo/pata3_velocity_controller/type
/hexapodo/pata4_velocity_controller/joint
/hexapodo/pata4_velocity_controller/pid/d
/hexapodo/pata4_velocity_controller/pid/i
/hexapodo/pata4_velocity_controller/pid/p
/hexapodo/pata4_velocity_controller/required_drive_mode
/hexapodo/pata4_velocity_controller/type
/hexapodo/pata5_velocity_controller/joint
/hexapodo/pata5_velocity_controller/pid/d
/hexapodo/pata5_velocity_controller/pid/i
/hexapodo/pata5_velocity_controller/pid/p
/hexapodo/pata5_velocity_controller/required_drive_mode
/hexapodo/pata5_velocity_controller/type
/hexapodo/pata6_velocity_controller/joint
/hexapodo/pata6_velocity_controller/pid/d
/hexapodo/pata6_velocity_controller/pid/i
/hexapodo/pata6_velocity_controller/pid/p
/hexapodo/pata6_velocity_controller/required_drive_mode
/hexapodo/pata6_velocity_controller/type
/robot_description
/rosdistro
/roslaunch/uris/host_jorge_ubuntu__44501
/rosversion
/run_id
There is nothing loaded about the controller_manager
↧
ZED camera not opening .... (roslaunch command)
i have installed zed sdk , zed ross wrapper , cuda 9.1 and dependencies . i get this error when i run
roslaunch zed_wrapper zed.launch
[ INFO] [1528800588.833885476]: Initializing nodelet with 8 worker threads.
[ERROR] [1528800588.856753422]: Failed to load nodelet [/zed/zed_wrapper_node] of type
[zed_wrapper/ZEDWrapperNodelet] even after refreshing the cache: Failed to load library /home/icrs1/catkin_ws/devel/lib//libZEDWrapper.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = libcuda.so.1: cannot open shared object file: No such file or directory)
[ERROR] [1528800588.856786753]: The error before refreshing the cache was: Failed to load library /home/icrs1/catkin_ws/devel/lib//libZEDWrapper.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = libcuda.so.1: cannot open shared object file: No such file or directory)
↧
↧
How to use substitution args in a yaml file?
I have a yaml file that is used by many launch files. I centralized most of the parameters in the yaml file, but those with substitution arguments do not get properly evaluated. Instead, they get passed in literally (verbatim) to the node. For example:
# params.yaml
showRobotModel: true
folderNameForSnapshots: $(find ocu)/snapshots
robot_description: cat $(find ocu)/media/robot_model/NIFTi.urdf
How could I avoid copy-pasting the more complex parameters in each launch file? Can they be interpreted somehow in the yaml file?
↧
How is pr2_controller_manager service created?
I am trying to run `roslaunch pr2_gazebo pr2_empty_world.launch` on Mac OS (ROS installation from http://wiki.ros.org/kinetic/Installation/OSX/Homebrew/Source and packages built and installed from source) and the command seems to hang at the `rospy.wait_for_service('pr2_controller_manager/load_controller')` method as evidenced by the shutdown error when I cancel the command:
`Traceback (most recent call last):
File "/Users/joshuaaduol/ros_catkin_ws/install_isolated/lib/pr2_controller_manager/spawner", line 161, in
if __name__ == '__main__': main()
File "/Users/joshuaaduol/ros_catkin_ws/install_isolated/lib/pr2_controller_manager/spawner", line 92, in main
rospy.wait_for_service('pr2_controller_manager/load_controller')
File "/Users/joshuaaduol/ros_catkin_ws/install_isolated/lib/python2.7/site-packages/rospy/impl/tcpros_service.py", line 159, in wait_for_service
raise ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown`
This means that the `pr2_controller_manager/load_controller` service isn't started and so I would like to know how these services are initialised so that I can investigate what is going on.
From what I can see these services are created in the `pr2_controller_manager/src/controller_manager.cpp` file and when I compile the package this code is put into a `.dylib` file. What I don't get is what this file is linked to and how the code is actually run when you want to, say, spawn a controller.
I also suspect that the `gazebo_ros_controller_manager` plugin [here](https://github.com/PR2/pr2_common/blob/kinetic-devel/pr2_description/gazebo/gazebo.urdf.xacro) is somehow related but when I change the `.so` extension to `.dylib` and add the path to the `lib` directory to `GAZEBO_PLUGIN_PATH` (or simply put the full path to the library) no changes are observed.
Any help with this would be greatly appreciated.
↧
Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure
Hello All,
I have a motor controller board which is tuned using a ros node. The parameters of this board need to be tuned only once and then use the tuning parameters at each launch. Currently I have two parts to this node. Part A launches the node with parameters in a config.yaml file. The contents of which i manually typed in. Part B launches the dynamic reconfiguration tool and helps me figure out the values of these parameters ( which i manually type into config.yaml) . I can then save the current configuration from dyn reconfigure using the save icon in rqt (top left) ( let say this file is dynConfig.yaml ).
I want to launch Part A of the node using rosparam load with dynConfig.yaml as the file instead of config.yaml. If i directly use the dynConfig.yaml file in launch file i get the following error
error loading tag:
'param' attribute must be set for non-dictionary values
XML is
The traceback for the exception was written to the log file
My understanding is that this is because dynamic reconfigure adds some additional lines in the dynConfig.yaml which the rosparam is not expecting.
these are the first few lines of the file when saved from rqt.
!!python/object/new:dynamic_reconfigure.encoding.Config
dictitems:
UPLOAD_VALUES_PORT_1: false
UPLOAD_VALUES_PORT_2: false
groups: !!python/object/new:dynamic_reconfigure.encoding.Config
dictitems:
groups: !!python/object/new:dynamic_reconfigure.encoding.Config
dictitems:
PORT_1: !!python/object/new:dynamic_reconfigure.encoding.Config
dictitems:
I want to know if there is a way that i can either convert dynConfig.yaml formatting to the .yaml that roslaunch expects or a way to directly save it in the right formatting. OR if i am doing it entirely the wrong way.
Thank you
↧
Monitor remote nodes with roslaunch API
I am using the Python API of roslaunch to run several nodes, part of them on a remote machine (configured in the launch files).
Since I need to know when nodes terminate or crash, I set up a process listener that should get called whenever a node dies. This is working well for nodes that run on the same machine. However, for nodes that run on the remote machine, the callback is not called for single nodes but only once the whole launch file terminates.
**Is it possible to somehow set it up in a way that the process listener is also called for dying nodes on remote machines?**
In case it is relevant, I am using ROS Kinetic on Ubuntu 16.04.
----------
To clarify my problem, I provide a minimal example in the following.
This script is used for launching:
import rospy
import roslaunch
class ProcessListener(roslaunch.pmon.ProcessListener):
def process_died(self, name, exit_code):
rospy.logwarn("%s died with code %s", name, exit_code)
def init_launch(launchfile, process_listener):
uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
roslaunch.configure_logging(uuid)
launch = roslaunch.parent.ROSLaunchParent(
uuid,
[launchfile],
process_listeners=[process_listener],
)
return launch
if __name__ == "__main__":
rospy.init_node("remote_launcher")
launch_file = "/path/to/my/launchfile.launch"
launch = init_launch(launch_file, ProcessListener())
launch.start()
rospy.spin()
launch.shutdown()
The launch file starts two nodes "node1" and "node2" which I then kill manually using `rosnode kill node1` and `rosnode kill node2`.
When I configure it to run them on the same machine as the script above, get the following prints:
> [WARN] [rosout]: node1-1 died with code 0
> [WARN] [rosout]: node2-2 died with code 0
However, when I configure it to run the nodes on a remote machine, the process listener is not called for the first kill but only for the second, giving the following output:
> [WARN] [rosout]: remote-hostname-0 died with code None
I think it should be somehow possible to also get a callback for dying remote nodes, as I still get the output from roslaunch itself, saying
> [remote-hostname-0]: [node1-1] process has finished cleanly
> [remote-hostname-0]: [node2-2] process has finished cleanly
↧
↧
the error about "roslaunch"when driving the teleoperating part
I just following the guide: http://learn.turtlebot.com/
and when testing turtleBot Installation using the command:
roslaunch turtlebot_bringup minimal.launch
it just run successfully(seems to) and print this :
SUMMARY
========
PARAMETERS
* /app_manager/auto_rapp_installation: False
* /app_manager/auto_start_rapp:
* /app_manager/capability_server_name: capability_server
* /app_manager/local_remote_controllers_only: False
* /app_manager/preferred: [{'rocon_apps/chi...
* /app_manager/rapp_package_blacklist: []
* /app_manager/rapp_package_whitelist: ['rocon_apps', 't...
* /app_manager/robot_icon: turtlebot_bringup...
* /app_manager/robot_name: turtlebot
* /app_manager/robot_type: turtlebot
* /app_manager/screen: True
* /app_manager/simulation: False
* /app_manager/use_gateway_uuids: False
* /bumper2pointcloud/pointcloud_radius: 0.24
* /capability_server/blacklist: ['std_capabilitie...
* /capability_server/defaults/kobuki_capabilities/KobukiBringup: kobuki_capabiliti...
* /capability_server/defaults/kobuki_capabilities/KobukiBumper: kobuki_capabiliti...
* /capability_server/defaults/kobuki_capabilities/KobukiCliffDetection: kobuki_capabiliti...
* /capability_server/defaults/kobuki_capabilities/KobukiLED1: kobuki_capabiliti...
* /capability_server/defaults/kobuki_capabilities/KobukiLED2: kobuki_capabiliti...
* /capability_server/defaults/kobuki_capabilities/KobukiLED: kobuki_capabiliti...
* /capability_server/defaults/kobuki_capabilities/KobukiWheelDropDetection: kobuki_capabiliti...
* /capability_server/defaults/std_capabilities/Diagnostics: turtlebot_capabil...
* /capability_server/defaults/std_capabilities/DifferentialMobileBase: kobuki_capabiliti...
* /capability_server/defaults/std_capabilities/LaserSensor: turtlebot_capabil...
* /capability_server/defaults/std_capabilities/RGBDSensor: turtlebot_capabil...
* /capability_server/defaults/std_capabilities/RobotStatePublisher: turtlebot_capabil...
* /capability_server/defaults/turtlebot_capabilities/TurtleBotBringup: turtlebot_capabil...
* /capability_server/nodelet_manager_name: capability_server...
* /capability_server/package_whitelist: ['kobuki_capabili...
* /cmd_vel_mux/yaml_cfg_file: /home/luzixuan/tu...
* /description: Kick-ass ROS turtle
* /diagnostic_aggregator/analyzers/input_ports/contains: ['Digital Input',...
* /diagnostic_aggregator/analyzers/input_ports/path: Input Ports
* /diagnostic_aggregator/analyzers/input_ports/remove_prefix: mobile_base_nodel...
* /diagnostic_aggregator/analyzers/input_ports/timeout: 5.0
* /diagnostic_aggregator/analyzers/input_ports/type: diagnostic_aggreg...
* /diagnostic_aggregator/analyzers/kobuki/contains: ['Watchdog', 'Mot...
* /diagnostic_aggregator/analyzers/kobuki/path: Kobuki
* /diagnostic_aggregator/analyzers/kobuki/remove_prefix: mobile_base_nodel...
* /diagnostic_aggregator/analyzers/kobuki/timeout: 5.0
* /diagnostic_aggregator/analyzers/kobuki/type: diagnostic_aggreg...
* /diagnostic_aggregator/analyzers/power/contains: ['Battery', 'Lapt...
* /diagnostic_aggregator/analyzers/power/path: Power System
* /diagnostic_aggregator/analyzers/power/remove_prefix: mobile_base_nodel...
* /diagnostic_aggregator/analyzers/power/timeout: 5.0
* /diagnostic_aggregator/analyzers/power/type: diagnostic_aggreg...
* /diagnostic_aggregator/analyzers/sensors/contains: ['Cliff Sensor', ...
* /diagnostic_aggregator/analyzers/sensors/path: Sensors
* /diagnostic_aggregator/analyzers/sensors/remove_prefix: mobile_base_nodel...
* /diagnostic_aggregator/analyzers/sensors/timeout: 5.0
* /diagnostic_aggregator/analyzers/sensors/type: diagnostic_aggreg...
* /diagnostic_aggregator/base_path:
* /diagnostic_aggregator/pub_rate: 1.0
* /icon: turtlebot_bringup...
* /interactions/interactions: ['turtlebot_bring...
* /interactions/pairing: True
* /interactions/rosbridge_address: localhost
* /interactions/rosbridge_port: 9090
* /interactions/webserver_address: webapp.robotconce...
* /mobile_base/base_frame: base_footprint
* /mobile_base/battery_capacity: 16.5
* /mobile_base/battery_dangerous: 13.2
* /mobile_base/battery_low: 14.0
* /mobile_base/cmd_vel_timeout: 0.6
* /mobile_base/device_port: /dev/kobuki
* /mobile_base/odom_frame: odom
* /mobile_base/publish_tf: True
* /mobile_base/use_imu_heading: True
* /mobile_base/wheel_left_joint_name: wheel_left_joint
* /mobile_base/wheel_right_joint_name: wheel_right_joint
* /name: turtlebot
* /robot/name: turtlebot
* /robot/type: turtlebot
* /robot_description:
↧
Change behavior of killing nodes with same name
Any node which is already running with some name `my_node_name` will be killed if I run any node with the same name via `rosrun` and `roslaunch`.
Example:
# First terminal
rosrun rviz rviz __name:=rviz
# Second terminal
rosrun rviz rviz __name:=rviz
# First terminal again
[ WARN] [1529837879.313228883]: Shutdown request received.
[ WARN] [1529837879.313324710]: Reason given for shutdown: [new node registered with same name]
The only exceptions are nodes which are defined in the `roscore.xml` as explained [here](http://wiki.ros.org/roscore).
My question is, can I change the behavior of `rosrun/launch` such that old nodes keep running and new nodes will be killed?
↧
Best way to check if ROS is running
I am writing a script, which relies on ROS currently running. I would like to check if ROS is currently running on the script's machine. What's the best way to do this?
A couple ways I am considering are pinging Master URI and checking the processes. However, I'm asking to see if there's a better way. Perhaps an environment variable is set.
↧
Kill and relaunch .launch file from bash script
Hi,
I would like to make some benchmark of my system. For this I want to create bash script which launches a launch file, waits on some kind of termination and in the end kill the launch file (killing the whole ROS would be better imo). Then do this again and again.
How could I achieve something like this?
Thank you for any advice.
↧
↧
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
Several days ago, I found an opensource code on [GitHub](https://github.com/idsc-frazzoli/ardrone_testbed), which aims to run ORBSLAM using the drone with a front-looking camera. So I plan to rerun this project with my own laptop. Here are some errors what I have encountered when compiling the project.
First, I followed the instructions provided by the authors,
cd ardrone_ws/src/ORB_SLAM2
chmod +x build.sh
./build/sh
cd /ardrone_ws/src/
catkin_init_workspace
cd /ardrone_ws/
catkin_make
source devel/setup.bash
after entered the command on the window
roslaunch main.launch,
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[ORB_mono-1] process has died [pid 10502, exit code -6, cmd /home/htf/ardrone_ws/devel/lib/ardrone_orb/ros_orb_node /home/htf/ardrone_ws/src/ardrone_orb/ORBvoc.txt /home/htf/ardrone_ws/src/ardrone_orb/settings.yaml /camera/image_raw:=/ardrone/front/image_raw __name:=ORB_mono __log:=/home/htf/.ros/log/4ad799de-7b73-11e8-bdf1-80a589d234a5/ORB_mono-1.log].
log file: /home/htf/.ros/log/4ad799de-7b73-11e8-bdf1-80a589d234a5/ORB_mono-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
I couldn't understand why it will happen, the ORBmap and camera window were disappeared after few seconds.
hope someone could give me a little clues
↧
Problems with roslaunch ur_modern_driver ur5_bringup.launch
I'm trying to use the test launch file from ur_modern_driver to check ROS package for controlling UR5.
The run is unsuccessful by following error:
ERROR: cannot launch node of type [ur_modern_driver/ur_driver]: can't locate node [ur_driver] in package [ur_modern_driver]
I've followed the installation of universal-robot and ur_modern_driver packages from git. I'm using Ubuntu 18.04 and melodic ROS. I also updated the UR5 software to the newest version 3.6.0.
In addition, I installed Ubuntu 16.04 and kinetic ROS on VR machine and got the same error.
Any suggestion?
Thanks!
↧
Provide empty string as roslaunch argument substitution
I have a `default.launch` file with some arguments and default values (strings).
I would like to substitute a default value with an empty string while launching, e.g.
roslaunch pkg default.launch arg1:=""
But the substitution is ignored. Also ignored are:
roslaunch pkg default.launch arg1:=''
roslaunch pkg default.launch arg1:=" "
etc.
Working substitutions are:
roslaunch pkg default.launch arg1:="!"
roslaunch pkg default.launch arg1:='test'
etc.
How can I provide an *empty string* as an argument substitution?
↧
Invalid tag (husky simulation)
Hi,
I know this have been asked a few times but I have wasted 2 days trying to make this work and still no resolution. I think it's something to do with URDF which I am not very familiar with so any suggestions or help are greatly appreciated!
I am trying to install this package here: [waypoint_nav](https://github.com/nickcharron/waypoint_nav), whilst following the tutorials here: [tutorial](http://www.clearpathrobotics.com/assets/guides/husky/HuskyGPSWaypointNav.html)
Whenever I launch `roslaunch outdoor_waypoint_nav outdoor_waypoint_nav_sim.launch`I get this:
roslaunch outdoor_waypoint_nav outdoor_waypoint_nav_sim.launch
... logging to /home/arthur/.ros/log/e5783a58-881f-11e8-ace3-08002758e07b/roslaunch-Doge-17757.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
Undefined substitution argument urdf_extras None
when processing file: /opt/ros/kinetic/share/husky_description/urdf/husky.urdf.xacro
included from: /home/arthur/catkin_ws/src/waypoint_nav/husky_customization/husky_custom_description/urdf/custom_description.urdf.xacro
included from: /home/arthur/catkin_ws/src/waypoint_nav/husky_customization/husky_custom_gazebo/urdf/custom_description.gazebo.xacro
while processing /home/arthur/catkin_ws/src/waypoint_nav/outdoor_waypoint_nav/launch/include/gazebo.launch:
while processing /home/arthur/catkin_ws/src/waypoint_nav/husky_simulator/husky_gazebo/launch/husky_empty_world.launch:
while processing /home/arthur/catkin_ws/src/waypoint_nav/husky_simulator/husky_gazebo/launch/spawn_husky.launch:
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py '/home/arthur/catkin_ws/src/waypoint_nav/husky_customization/husky_custom_gazebo/urdf/custom_description.gazebo.xacro' laser_enabled:=true ur5_enabled:=false kinect_enabled:=false ] returned with code [2].
Param xml is The traceback for the exception was written to the log file
I have looked into the launch and URDF files, I still can't find out what the problem is. Could anyone with more experience please try compiling this package and see how to launch it?
Any input is greatly appreciated!
↧
↧
rospy.init_node in multiprocessing.Process
Hello everyone,
I have the following setup:
- The main thread which starts a ROS node with services, pubs, and subs
- A multiprocessing.Process which also should start an (anonymous) ROS node that has pubs and subs
So far so good. When I start (fork) the new process before calling rospy.init_node, everything works fine when I start from the command line.
However, when I start the application via roslaunch, I get the following error:
> shutdown request: new node registered with same name
It looks like roslaunch/node enforces a new name in every node started as a subprocess. Any ideas how to circumvent the problem?
↧
rospy.ServiceProxy master port mismatch
On my dev machine I run ros master on default port `11311` via `ROSLaunchParent` as follows:
os.environ["ROS_IP"] = ""
os.environ["ROS_MASTER_URI"] = "http://:11311"
roslaunch = ROSLaunchParent('', [], is_core=True, port=11311)
roslaunch.start()
stdout states that the roslaunch server is running on port `43121` (changes randomly between starts of roslaunch):
started roslaunch server http://:43121/
The master seems to be started on port `11311`:
auto-starting new master
process[master]: started with pid [15304]
ROS_MASTER_URI=http://:11311/
I use [`docker-py`](https://docker-py.readthedocs.io/en/stable/index.html) (`dc` is a `client`, `di` is an `images` instance, `dn` is a `network`) to run a ROS node `` in a docker container which connects to the dev machines master.
dn = dc.networks.create(name='some_test', driver="bridge")
some_node = dc.containers.run(image=di[0].id, environment=["ROS_IP=", "ROS_MASTER_URI=http://:11311"], name='', network='test', command=rosrun_command, detach=True, tty=True)
`import rosnode; nodes = rosnode.get_node_names(); print(nodes)` lists `/` (and `/rosout`). `some-node` is (at least) discoverable in the network. So far so good.
If I send multiple service requests with
rc_itempick_start = rospy.ServiceProxy('//', )
rc_itempick_start()
a random port is used instead of `11311`:
core.py WARNING Unknown error initiating TCP/IP socket to :35516 (rosrpc://:35516)
(...)
error: [Errno 113] No route to host
core.py WARNING Unknown error initiating TCP/IP socket to :60739 (rosrpc://:60739)
(...)
error: [Errno 113] No route to host
(etc.)
Can someone help out in cross-checking what I missed?
↧
Programmatic way to stop roslaunch
I saw in the description of roslaunch this:
*"roslaunch is an important tool that manages the start and stop of ROS nodes"*
But I am not able to find how to stop a roslaunch.
Is there any method to kill all nodes of a roslaunch in one instructions?
Thank You
↧