ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2022-05-03 07:08:55 -0500 | received badge | ● Guru (source) |
2022-05-03 07:08:55 -0500 | received badge | ● Great Answer (source) |
2020-12-17 12:18:55 -0500 | received badge | ● Great Question (source) |
2020-05-28 08:27:55 -0500 | marked best answer | gtest testing function with subscriber reference Im using gtest for writing test suites for my robot. Im trying to test a function that i use to convert my twist message being sent from the Nav Stack or joystick (cmd_vel topic) that is then converted into my individual wheel velocities for my roboteq motor controller. This function that i am testing is used in the cmd_vel subscriber callback in my roboteq driver node. So normally, when the callback is fired, i pass the reference of the twist, into my function like so (i type def'd geometry_msgs::Twist to TTwist, and TWheelMsg is my custom msg, also type def'd) Where my my conversion function is defined like so: In my gtest class, im not sure how i can use this ConvertTwtistToWheelVelocity function since it is passing a reference. I tried looking up in the API docs where the reference originated from, and found that in the node handle subscriber template here it passes a boost shared pointer, which in my case i passed type geometry_msgs::Twist. So then i looked inside of the geometry_msgs source file, and found this: Can someone please tell me what should i do to be able to pass some value (clearly has to be reference) into the ConvertTwistToWheelVelocity function? I dont know what to do since std::allocator is the template type. Since in the API docs it says that the node handle subscribe function is a template EDIT: here is what my subscriber call looks like: |
2019-11-10 16:40:56 -0500 | received badge | ● Guru (source) |
2019-11-10 16:40:56 -0500 | received badge | ● Great Answer (source) |
2019-03-12 09:22:11 -0500 | received badge | ● Great Answer (source) |
2019-03-12 09:22:11 -0500 | received badge | ● Guru (source) |
2019-01-17 07:44:04 -0500 | received badge | ● Good Answer (source) |
2018-09-07 20:21:46 -0500 | received badge | ● Guru (source) |
2018-09-07 20:21:46 -0500 | received badge | ● Great Answer (source) |
2018-06-16 13:13:27 -0500 | received badge | ● Good Answer (source) |
2018-05-31 05:36:18 -0500 | marked best answer | Filling sensor_msgs/Image with uint8_t buffer array So I'm working on making a camera driver, and the data struct contains the frame data such as the height and width, and uint8_t leftData and uint8_t rightData pointers. Ive been trying to see which way would be the best way to just fill simple fill in the sensor_msgs/Image message i create, but i cannot seem to find how to do it. Here is what i have tried so far: But with that i get a error saying "no viable overloaded '=' " Then after searching around i found people linking to the sensor_msgs::fillImage() header, and tried to use the memcpy method, but that did not work either (i got a seg fault) Then i tried using the cv::Mat constructor to see if i could at LEAST somehow get a image to publish, by passing the size, type, and data pointer (pFrameData->leftData). No luck with any of them. Im really new to opencv, cv_bridge, and camera related things in general. Would someone be able to guide me in the right direction? Here is a example buffer for the left camera if i just print to the screen: EDIT 1: Here is my frame callback function (after trying ahendrix's solution, which gave a malloc error which i put in comments below): |
2018-05-31 05:36:18 -0500 | received badge | ● Self-Learner (source) |
2017-08-13 07:25:58 -0500 | received badge | ● Nice Answer (source) |
2017-07-24 16:24:14 -0500 | received badge | ● Nice Answer (source) |
2017-04-20 13:52:58 -0500 | marked best answer | Using gazebo_ros_control with SDF instead of URDF My robot has a closed loop linkage, and therefore I cant use a URDF file as URDF only supports tree strucutres. Since SDF supports graph structures, I need to use that in order to simulate my robot. With that being said, I have a 2 actuators as well as a servo that I need to control. Normally, if I was to use an URDF, I would setup the All the ros_control tutorials are based upon URDF, although there are lines in the tutorials stating "for your URDF/SDF file". Currently, im simply adding this tag to the bottom of my SDF file (i wont include the whole thing for space reasons, for now at least): And when i launch the simulation, this is the error I receive in which i cant pinpoint where it comes from (searched through the ros_control plugin code): The error Any help would be appreciated. Would anyone know if the gazebo_ros_control plugin is meant to work directly with a SDF file? Ive looked around and a few people asked the question a while back but received no responses. |
2017-04-08 04:22:17 -0500 | received badge | ● Nice Answer (source) |
2017-04-08 04:22:10 -0500 | received badge | ● Good Question (source) |
2017-04-06 11:21:02 -0500 | received badge | ● Good Answer (source) |
2016-10-27 07:18:31 -0500 | marked best answer | sbpl_lattice_planner loading move_base plugin fails Im trying to setup my nav config to use I did the following to install/use sbpl_lattice planner as a plugin: As when i install So after i install the sbpl ros debian, I clone the Then So i use Would anyone happen to know if im missing something/mis-configuring something? I know you must load a primitives file (which was the first issue i overcame). |
2016-10-27 07:18:31 -0500 | received badge | ● Self-Learner (source) |
2016-10-21 10:02:40 -0500 | received badge | ● Critic (source) |
2016-09-26 08:49:17 -0500 | received badge | ● Good Answer (source) |
2016-07-08 19:00:43 -0500 | commented answer | How to get a map view of my bot using ROS? I updated my post on how to turn the data from the gps into ros messages |
2016-06-28 21:42:40 -0500 | answered a question | How to get a map view of my bot using ROS? If what you are referring to is a satellite image representation of your current UTM position, there is a nice package that does this called EDIT: To publish the data as a rostopic, you will want to use a driver such as |
2016-05-28 16:59:56 -0500 | commented answer | IMU_node doesn't work with 3dm-gx3-25, indigo, ubuntu 14.04 I actually ended up disabling it after i set a calibration from the microstrain utility application on windows |
2016-05-28 16:59:09 -0500 | commented question | imu_node calibration check failed anybody figure this out? |
2016-05-28 16:57:35 -0500 | answered a question | libackermann_plugin.so I havent ever tried that plugin you are trying to use, however theres another plugin that can be used called |
2016-05-09 12:01:33 -0500 | commented question | Problem using CameraPublisher plugin gazebo5 have you installed gazebo5_ros_pkgs? |
2016-05-09 11:58:54 -0500 | answered a question | IMU_node doesn't work with 3dm-gx3-25, indigo, ubuntu 14.04 For me, the 3dm-gx3-25 showed up on /dev/ttyACM0 by defualt. Try typing Id also recommend that you set up some udev rules. You can use this one |
2016-05-09 11:48:33 -0500 | commented question | Subscribing /map consumes 4gb of memory!?!?! What is the input source (into gmapping) frequency? I.e. your laser scanner, etc. |
2016-05-08 15:28:03 -0500 | received badge | ● Guru (source) |
2016-05-06 13:06:07 -0500 | commented answer | Set delay between starting nodes within launch file Yes that is correct |
2016-05-06 07:42:12 -0500 | received badge | ● Nice Answer (source) |
2016-05-05 22:06:57 -0500 | answered a question | Set delay between starting nodes within launch file Currently there is no such implementation. However, this was a topic brought up at the last ROS Live meeting, and seems that the idea is to try and allow a user to have more 'coding' freedom from within a launch file. I have seen some workarounds that people have posted in the past, and what they did was created a regular bash script that called roslaunch files from within itself, as it was easier (or maybe currently the only way) to implement a delay between roslaunch starts. |
2016-04-13 21:27:12 -0500 | commented answer | Using gazebo_ros_control with SDF instead of URDF @Adnen , I didnt create any custom plugin for this as I currently dont see any easy way of implementing a fix for this by creating a plugin. Did you have anything in mind? |
2016-04-07 02:00:39 -0500 | received badge | ● Good Answer (source) |
2016-02-15 21:10:23 -0500 | received badge | ● Self-Learner (source) |
2016-02-15 21:10:15 -0500 | received badge | ● Nice Question (source) |
2016-02-02 15:16:25 -0500 | marked best answer | Couldn't find an AF_INET address for [] with Virtual Machine So i tried a few different things already, primarily this answers: http://answers.ros.org/question/16355... but for some reason im still getting the Couldn't find an AF_INET address error. I have a gazebo simulation setup on my desktop machine (14.04 indigo) that im running, and then trying to get my ubuntu VM on my mac to connect with the ros master on my desktop (for rviz and development purposes). Im using Parallels 10 and have two network interfaces configured; 1-shared network between mac and vm, 2-WiFi bridge so that the VM can have a ip address that is on the same subnet as my desktop (to allow one to ping the other, as said is needed in the network setup tutorials). I editted and my VM : and then on my desktop (ros master) i edited the and on my VM i edited Im not sure whether the ROS_IP can also simply be the respective hostname or not, but thats what the answers i posted in the beggining said to do, and i was under the impression that that answer was already assuming you followed the NetworkSetup tutorial with having to setup the hostnames properly. Might be a quick fix, but if anyone could give some insight thatd be great. Cheers |