Similarly like i can put a plugin in urdf file and than when i launch that urdf in gazebo i can control that robot, isn't their any way how i can contol the robot model. I tried to use this line in my launch file but its not working:<param name="robot_description" textfile="$(find <my_robot>)/model.sdf"/>
So is their any way how i can use the plugin from sdf robot to my gazebo ros control package or robot_description src file similarly like i did with urdf file. Like when i launchdd the urdf file with plugins in them, i can communicate with the robot from my plugin file than use ros control. Similarly i loaded the sdf robot in my world file than when i launchd it from my roslaunch file the plugin is not loaded. Why i want to do this was, because so many robot models like r2, kuka and others where present in sdf format so i want to communicate them from my ros package. I am using ros indigo and gazebo 7.4 for robot simulation.
Why is this happening that when i spawn a urdf robot in gazebo i'm able to communicate it through ros but not when i spawn a sdf robot?
Documentation reads:
Under the hood, Gazebo will then convert the URDF to SDF automatically.
Thus, I suggest the problem is in the way you run your sdf, nothing to do with sdf or urdf. Have you tried running the sdf directly (like rosrun gazebo_ros gazebo /path/to/your/sdf)? Not sure about indigo, it helped with kinetic.
Related
I am trying to integrate drake as a physics simulator with in my code. My code does have ros2 as IPC, but the code itself is ROS agnostic. I am using colcon to build the code and I am using CMakeList with drake installed using apt on ubuntu 22.04.
I am trying to load the urdf in drake with in my class structure. I my header file, I defined the following parameters:
drake::systems::DiagramBuilder<double> builder_;
drake::multibody::MultibodyPlant<double>* plant_{};
drake::geometry::SceneGraph<double>* scene_graph_{};`
In my source file, my code is
std::tie(plant_, scene_graph_) = AddMultibodyPlantSceneGraph(&builder_, std::make_unique<MultibodyPlant<double>>(1e-3));
const std::string urdf = drake::FindResourceOrThrow("path_to_urdf/urdf.urdf");
drake::multibody::Parser(plant_).AddModelFromFile(urdf);
However, when I run the code, I get the following message
[****] terminate called after throwing an instance of 'std::runtime_error'
[***] what(): Drake resource_path '~/path_to_urdf/urdf.urdf' does not start with drake/.
I verified that file is available on the link. I tried creating the manual drake folder as well, but it keeps complaining.
I did saw the issue https://github.com/RobotLocomotion/drake-external-examples/issues/170 open but I am not sure if it is related to that. Any help or guidance will be highly appreciated.
In general, don't use FindResourceOrThrow to load models. It's intended only for Drake build system resources.
To use AddModelFromFile, just pass it an absolute path:
std::tie(plant_, scene_graph_) = ...
drake::multibody::Parser(plant_).AddModels("/full/path/to/myproject/urdf/foo.urdf");
You can also use ROS package paths, if you are using package.xml files:
std::tie(plant_, scene_graph_) = ...
drake::multibody::Parser parser(plant_);
parser.package_map().PopulateFromRosPackagePath();
std::string package_dir = parser.package_map().GetPath("myproject");
parser.AddModels(package_dir + "/urdf/foo.urdf");
In the next version of Drake (v1.13.0), there will also be a AddModelsFromUrl function to make ROS package paths even easier.
I know I should ask this one in ROS Forums but I couldn't due to some reasons (Sorry for that). So the thing is, I built standalone RTAB package from source in my Ubuntu 18.04 (Bionic) with ROS Melodic installed. I am trying to launch the node for rtab mapping by writing this in my sourced catkin workspace:
~/catkin_ws$ roslaunch rtabmap_ros-master/launch rtabmap.launch rtabmap_args:="--delete_db_on_start" rtabmapviz:=false rviz:=true
But when i do this it raises RLE Exception Error even though the path given to rtabmap.launch file is correct and file is at the location. Error is something like that:
RLException: [rtabmap.launch] is neither a launch file in package [rtabmap_ros-master] nor is [rtabmap_ros-master] a launch file name
I don't know why its giving this same error and i am stuck here. Please Help!!!
As the error suggests it can not find a launch file for that package. This is usually caused by one of two things. The first is you need to make sure you're sourcing the correct setup file; here it would be source ~/catkin_ws/setup.bash
The second thing is that you need to make sure you're actually installing the launch files so that they can be used when built. Here that would mean your CMakeLists.txt has something like this:
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
PATTERN ".svn" EXCLUDE)
I am using cartographer_ros. I have a URDF file in ~/catkin_ws/src/cartographer_ros/cartographer_ros/urdf. I am trying to update this URDF file, but even when I rebuild the workspace by deleting the build_isolated folder and then running catkin_make_isolated --install --use-ninja, RVIZ behaves as if I'm still using the old version of that URDF file when I run roslaunch cartographer_ros jackal_VLP16_kvhIMU_2D.launch. I have to actually create a new URDF file with a different filename and point to that in the launch file for any changes to take effect. This isn't normal, is it?
I am new to Digital Image Processing and want to do it using OpenCV on Eclipse. I just want to know how can i start doing it and how i can configure opencv and eclipse using CMAKE . Please suggest me some good tutorial.Also please help me with adding opencv include files and library in Eclipse.
I am using Eclipse Juno.
on Windows 7.
Thanks.
Your best bet is to begin with the OpenCV documentation. Their Getting Started tutorial should be your first stop. They have another strategy with a custom FindOpenCV.cmake file as documented here but I would suggest sticking with the strategy outlined in Getting Started.
In terms of eclipse, cmake generates IDE related metadata for you and Kitware does provide an eclipse CDT generator, documented here. Two important things to keep in mind. First cmake actually generates the eclipse metadata which you then import as an existing project. Second, the example they give is intended to work with Unix makefiles:
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../certi_src
If you are using windows you'll want to choose an appropriate generator instead of "Unix Makefiles"
Is there any way to integrate EDK2 based application to come into Bulls Eye Code Coverage tool? The executable will be having .efi extension, and it open's only in EFI shell. I believe, i also need to develop an driver to capture the coverage data into external disk for analysis, as the application will be valid only in the EFI Shell(BIOS).
So, does anyone have any idea, on how it can be done, for overall EFI Applications?
Thanks,
Pramod
These are the steps I took to integrate Bullseye into EDK2 (after installing Bullseye following the instruction on the website):
Use the /run/libcov-printf.c and replace the "printf" with "AsciiPrint".
Copy all the files from /run/ to your EDK $WORKSPACE
Create library .inf file and add libcov-printf.c to its [Source] section
Add library instance to your platform .dsc file (MdeModulePkg.dsc probably)
Add library reference to your application .inf file under [LibraryClass]
Add cov_dumpData() in your application source code (usually at its exit point).
compile using EDK2 build
You'll end up with an efi binary that you can run on your target and get the measurements once the application reaches its exit point.
The output data can be redirected to a file (using the > directive inside EDK2 shell) and then be processed by covpost to be merged into the cov file created in the build process.
Well I don't know how EFI works. However bullseye coverage support the customization. When I worked for the embedded system. I created open/read/write functions to write the coverage data not to the file but to the serial cable and I created the host application to interprete the data sent from serial cable and save them into cov file. I'm not sure if this works on your case well. However you can start from the following link.
http://www.bullseye.com/help/env-embedded.html