As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [c++]

C++ is a compiled general-purpose programming language that adds object-oriented features and other enhancements to the C language. It is popular for both embedded (including robotics) and PC software development.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

How to resolve 'nullptr not declared in this scope' compiling error in Ros_lib blink example and other ros_lib examples Ubuntu 20.04 with ROS Noetic?

I am new to ros and I am using virtual machine with Ubuntu 20.04 and ros neotic in it. I have installed rosserial arduino package step by step from this. After this I open ros_lib blink example and it ...
Maaz Ismail's user avatar
0 votes
0 answers
23 views

Is there a ROS kinetic topic for changing the image on Pepper's screen? [closed]

I need a way to change the image displayed in Pepper's screen, I have already launched the bringup and naoqi_driver but there ...
tototr's user avatar
  • 1
1 vote
1 answer
47 views

How to detect the position in a linear actuator?

I was planning on 3D printing my own 30 cm stroke length 3D printed linear actuator and I don't know how I could read its position, or tell it to go say to 16.5 cm. I used this video, 3D Printed ...
Mito's user avatar
  • 11
0 votes
0 answers
7 views

Where do I find detailed information about the building of programs using boost etc. with the intention of configuring my own API 'protocols'?

I'm brand new to programming in c++ and I'm exploring all the deepest interesting parts on my own, I'm very interested in learning about API programming and how to configure different applications ...
Ivan Black's user avatar
2 votes
1 answer
82 views

How to Access Robot Fields Inside a Webots-ROS2 Plugin?

I'm running Webots R2023a where I have a robot node marked as Supervisor in Webots world (*.wbt file) to be controlled by an external node in ROS2 network. When writing a webots-ros2 plugin, I'm faced ...
S4JJ4D's user avatar
  • 23
0 votes
1 answer
74 views

Drive to point PID doesn’t work properly

This is my first post here. I am trying to get a robot I’m working on to drive to a point via a PID controller. My code works fine if the point is in front of the robot, but completely falls apart if ...
SprintKeyz's user avatar
0 votes
0 answers
28 views

Hole detection on ROS with a stereo camera

I am trying to make a node in ROS that has as input a dynamic point cloud that is generated with a stereoscopic camera to which I have performed preprocessing. Now that point cloud that is generated ...
JhonathanR's user avatar
0 votes
2 answers
50 views

How could you have controllers communicate with each other?

I have been attempting to have two controllers be able to access information from each other in a way that is similar to object-oriented programming in UNITY, however, I have constantly had problems ...
Jonathan Ariel Callejas's user avatar
0 votes
0 answers
37 views

Checking for collision with octomap

I watched the octomap presentation from RosCon2013 and understood that implementing something like: ...
ignacio's user avatar
  • 113
0 votes
2 answers
146 views

How to create a vector of message_filters::Subscriber?

When I try to create a vector of message_filters::Subscriber like so: ...
Samuel Rodríguez's user avatar
2 votes
3 answers
329 views

Spdlog linker error with ROS2 packages

Good afternoon! We are a company that has a pretty big robotic framework and we are currently working in a transition into ROS2. We are first creating the structure that all of our packages will ...
Jorge Playán's user avatar
1 vote
1 answer
130 views

Can MoveIT framework be used separately from ROS, i.e. "as a standalone library"?

As far as I understand, MoveIT can act as a IK/FK solver one can supply input into (i.e. end-effector xyz) and get an output (joint angle values). I'd like to utilize this aspect of MoveIT (version 1) ...
Noideas's user avatar
  • 11
0 votes
0 answers
19 views

Improve four wheel steering system

I built a robot with a four wheels steering system where an absolute encoder is mounted on each wheel. I'm considering 0° when the wheel is steered on the left, 90° when the wheel faces forward and ...
Marcus Barnet's user avatar
0 votes
0 answers
25 views

orocos ros integration, createStream causes execution to stuck in a loop

I'm integrating orocos with ros, basically i created a component that read data from some input ports and write on output ports that create streams, because i want to public this values on ros topics ...
DarioZ's user avatar
  • 11
1 vote
1 answer
77 views

Inverse kinematics with curve constraints

I must calculate the inverse kinematics of a machine in which one of the joints is constrained to a curvilinear path. I looked for existing libraries to model the problem, but none of them seems to ...
iab's user avatar
  • 11
0 votes
1 answer
306 views

Calling external ROS service from C++ code

How can I call a ROS-service that was neither written nor published by me from within C++ code? I see the service listed when using rosservice list, which shows me ...
marc wellman's user avatar
0 votes
1 answer
1k views

PointCloud2 parse to xyz array in ROS2

I'm trying to find a solution of converting PointCloud2 message data into xyz array for further analysis. Though, in my case I'm interested only in 2d application. The information is either scarce or ...
nigeno's user avatar
  • 15
1 vote
1 answer
486 views

Nvidia Jetson Nanon GPIO c++ direct memory interfacing

Is there's any library to interface the Jetson Nano GPIO? There's the official Python interface, and there is an unofficial c++ interface which is working through the filesystem, and I'm interested in ...
Mercury's user avatar
  • 123
0 votes
0 answers
45 views

I'm controlling a stepper motor with GPIO pins with a for loop in C++. If I add a sensor reading to the for loop the motor gets slow, loud, and jerky

I have a C++ script actuating a motor and getting an accelerometer sensor reading every 20th or so pulse to the stepper motor. My problem is that the sensor readings are interrupting the pulses. ...
Ant's user avatar
  • 113
1 vote
1 answer
2k views

Creating a custom msg in ros2

I have a package with two nodes, that are communicating internally. For that reason I would like to create a custom msg to transfer data between them. I've followed this tutorial, which basically sets ...
Mercury's user avatar
  • 123
1 vote
1 answer
414 views

How to republish odometry in different frame?

I have navigation Odometry, but its some how not in the robot body frame. The odometry is being published in world frame, so its not correct. So i need to transform in the robot body frame as that how ...
bob's user avatar
  • 167
4 votes
1 answer
205 views

Does a stable library exist for docking robots using images?

I built a mobile base from scratch, and now I am focused on getting the robot to charge. The robot is using an on-board webcam (and PC) to detect a QR barcode on the charger unit. Using OpenCV I find ...
Mike's user avatar
  • 361
2 votes
1 answer
551 views

How to use Quaternion from IMU to get the transformation to inertial reference frame?

Im trying to get the Linear Velocity integrating the acceleration from IMu. I know there will be accumulated error due to integration bit before the integration I have to do couple of other steps. ...
bob's user avatar
  • 167
2 votes
1 answer
463 views

C++ (ROS node) for Euler Integration to estimate Velocity knowing the acceleration

Hi I have IMU reading and would like to estimate the linear Velocity knowing the linear acceleration from the IMU using the Euler method. Im aware of the accumulated error. So need a C++(python) code ...
bob's user avatar
  • 167
0 votes
2 answers
672 views

Publisher and subscriber in one ROS node error

I`m doing some underwater UUV Gazebo simulation and would like to use the hector_pose_estimation package to fuse IMU and Fluid pressure sensors input for pose ...
bob's user avatar
  • 167
0 votes
1 answer
393 views

How to do transformation to get correct linear velocity from linear acceleration IMU data?

I have IMU sensor that gives me the raw data such as orientation, Angular and Linear acceleration. Im using ROS and doing some Gazebo UUV simulation. Furthermore, I want to get linear velocity from ...
bob's user avatar
  • 167
0 votes
0 answers
80 views

IK Jacobian is always a singular matrix

I am trying to solve an inverse kinematics equation for 6DOF system, 3 rotation and 3 prismatic joints. I am trying to solve using perturbation method, by adjusting each joint and calculating the ...
Mich's user avatar
  • 101
0 votes
1 answer
908 views

Modifying Turtlebot3 to include different camera

I'm new to robotics in ROS. I've been learning about ROS and Gazebo using turtlebot (not turtlebot3 actually) on the platform The Construct. I would now like to incorporate turtlebot3 into my project. ...
John Brown's user avatar
1 vote
3 answers
239 views

What is the best way to simulate Staubli robots inside a C++/C# app

A little bit of context : I want to create an app using C++ (or C#) to handle 3D objects (obj), I will perform some operations on those 3D models to create some robotic trajectories. Then I want to ...
Jack's user avatar
  • 123
1 vote
1 answer
55 views

difference between the two constructors

What is the difference between the 2 pieces of code - ...
skpro19's user avatar
  • 195
0 votes
0 answers
256 views

Simple inverse Kinematic algorithm

I was looking for a simple inverse Kinematic algorithm that doesn't depend on eigen(doesn't work on my machine + dependency conflict never fixed it) Most of the code out in the internet is way to ...
Max N's user avatar
  • 11
3 votes
2 answers
226 views

PID Control: Is adding a delay before the next loop a good idea?

I am implementing PID control in c++ to make a differential drive robot turn an accurate number of degrees, but I am having many issues. Exiting control loop early due to fast loop runtime If the ...
droiddoes9's user avatar
1 vote
0 answers
18 views

Getting the new heading after a Transformation

Lets say I have 2d poses as such (angles in degrees): world_to_robot = {0, 4, 45} robot_to_object = {4, -4, -45} From a graph it would be easy to see that: world_to_object = {4, 8, theta}, what goes ...
notARobot's user avatar
1 vote
0 answers
50 views

How to correctly use [VertexSE3Expmap] as two connecting Vertex in Edge_V_V_GICP?

I am working on a pose estimation problem solved by Levenberg-Marquardt with g2o. I want to build 3D rigid constraint between two pose, so I choose Edge_V_V_GICP and test the g2o/examples/icp/...
Jerry123's user avatar
0 votes
2 answers
60 views

How do I get competent in using c++ for my projects? [closed]

I am a PhD student, working on Sensor Fusion and estimation problems. I would like as I finish my PhD to have acquired sound knowledge in what seems to be the industry norm for working with real ...
D Dim's user avatar
  • 21
1 vote
1 answer
200 views

Controller algorithm implementation in ROS/Gazebo

I am doing some robotic simulations in ROS/Gazebo and wondering what is the best way (programming-wise since I don't have a CS background) to implement a robot's motion controller. Here are the ...
Franky's user avatar
  • 536
0 votes
1 answer
75 views

Some Kalman filter implementation queries

Just to clear some doubts: Qn 1. Does kalman filter require constant time step? From my own study, it does not seem necessary to have a constant time step. You just need to take into account time ...
user1538798's user avatar
2 votes
3 answers
975 views

How to implement path planning algorithm considering orientation?

I am developing GUI c++ program to test path planning algorithms: A*, Dijkstra, ....etc in occupancy grid map. I found many open source codes , but I need to modify them to design a GUI for testing ...
user599086's user avatar
4 votes
1 answer
90 views

Make robot drive as far from obstacles as possible

I am trying to make robot drive around the room, avoiding obstacles with pathfinding. The problem is I get few waypoints from pathfinding algorithm for robot to drive to (green dots), but it drive a ...
Name's user avatar
  • 41
3 votes
2 answers
2k views

How to get unix/posix time stamp in header of ROS msg?

I am using two sensors each connected to different machine (each machine separately runs Ubuntu 16.04 and ROS Kinetic). When I echo topic on these two machines, I ...
fhm's user avatar
  • 31
0 votes
2 answers
1k views

/odom topics not matching ERROR

I have an existing ROS workspace which was built in C++. I am trying to implement a node built by The Construct in python which reads distance travelled from the ...
neerbasu's user avatar
3 votes
1 answer
785 views

Command line boolean parameters to ros node

I'm working with ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. I want to get two boolean parameters from command line. To do it, I have this code: ...
VansFannel's user avatar
5 votes
2 answers
232 views

How Can A Total Beginner Become A Skilled Roboticist?

Say the only computer skill you have is programming in C/C++...what all things would you have to learn in order to be an adept full stack roboticist, one who can single-handedly build an autonomous/AI ...
Coder Motor's user avatar
1 vote
0 answers
54 views

Any way to program a robot remotely?

So Udacity, Kuka and KIT are/were offering a Kuka challenge. Basically, the participants got to write code and run it remotely on a Kuka robot based in the KIT labs in Germany and submit their code ...
Andros Adrianopolos's user avatar
4 votes
1 answer
642 views

Adjusting the PWM frequency and duty cycle to achieve the desired angular velocity in differential drive robots

I am practicing C++ and intro to robotics using a simple differential drive robot and a raspberry pi. Also following along the GA Tech course on control of mobile robotics. The implementation I am ...
Sam Hammamy's user avatar
0 votes
1 answer
53 views

Real world dynamic problem suggestion for PID [closed]

I need you guys to suggest me a problem that requires to change PID coefficients in different times. Lets say every 1 minutes the environment should change and readjust the PID’s parameters. Note that ...
WhoCares's user avatar
  • 111
1 vote
1 answer
259 views

Subscriber to array type overwriting data from different publishers!

I have been witnessing some bizarre behaviour with my very simple node. I have a custom message that contains uint8[] type (it's 8 elements long). I have a ...
Shibalicious's user avatar
1 vote
0 answers
271 views

Detecting and counting the number of junctions

So I am making a robot which is to follow a line. The field has both +(junctions) as well(by the intersection of two lights). I am yet to figure out what exactly is the best way to track the number of ...
robotlover's user avatar
3 votes
1 answer
765 views

Multiple View Triangulation method used by COLMAP

I'm looking at how COLMAP does multi-view triangulation. I can't work out what this function is doing. I can't find any formulas which look similar. The input "proj_matricies" come from pose data, the ...
B_N's user avatar
  • 33
2 votes
2 answers
556 views

ROS: Sensor data via USB

Im working on a project and i want to use a sensor. I can plug in the sensor via usb. I do not need any driver for the sensor. My task is to have an access to the sensor data. I have followed the ...
user avatar