Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
T
torcs_dl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
autonomousdriving
torcs_dl
Commits
299c1090
Commit
299c1090
authored
Jun 19, 2018
by
Svetlana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to TORCS clients
parent
c8549d76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
TorcsEMAMGenerator/src/main/resources/torcs/src/camera/src/main.cpp
...enerator/src/main/resources/torcs/src/camera/src/main.cpp
+3
-2
TorcsEMAMGenerator/src/main/resources/torcs/src/camera/src/torcsclient.h
...tor/src/main/resources/torcs/src/camera/src/torcsclient.h
+1
-1
No files found.
TorcsEMAMGenerator/src/main/resources/torcs/src/camera/src/main.cpp
View file @
299c1090
...
...
@@ -18,9 +18,10 @@ int main(int argc, char **argv)
{
std_msgs
::
Int8MultiArray
::
Ptr
msg
(
new
std_msgs
::
Int8MultiArray
);
msg
->
data
.
resize
(
torcs
::
IMAGE_SIZE_BYTES
);
constexpr
auto
SCALED_IMAGE_SIZE_BYTES
=
280
*
210
*
3u
;
const
auto
imageData
=
client
.
getScreenshot
();
memcpy
(
msg
->
data
.
data
(),
imageData
->
data
(),
imageData
->
size
()
);
memcpy
(
msg
->
data
.
data
(),
imageData
->
data
(),
SCALED_IMAGE_SIZE_BYTES
);
ROS_INFO
(
"%f"
,
msg
->
data
[
0
]);
chatter_pub
.
publish
(
msg
);
...
...
TorcsEMAMGenerator/src/main/resources/torcs/src/camera/src/torcsclient.h
View file @
299c1090
...
...
@@ -63,7 +63,7 @@ class TorcsClient
{
public:
TorcsClient
();
void
sendCommand
(
Command
cmd
);
std
::
unique_ptr
<
DataContainer
>
getScreenshot
(
);
private:
struct
shared_use_st
*
shared
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment